From ac09681d49be56600bcbc293387508fba0f72941 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sat, 8 Oct 2022 13:25:07 +0200 Subject: [PATCH] lsp --- backend/openapi.yaml | 31 +- backend/src/worker.rs | 7 +- frontend/CaddyfileLsp | 14 + frontend/src/lib/components/Editor.svelte | 16 +- frontend/src/lib/components/EditorBar.svelte | 4 +- frontend/src/lib/editorUtils.ts | 2 + frontend/src/lib/script_helpers.ts | 8 +- lsp/Dockerfile | 5 + lsp/Pipfile | 4 +- lsp/pyls_launcher.py | 14 + python-client/build.sh | 2 +- python-client/windmill-api/.gitignore | 23 + python-client/windmill-api/LICENSE | 201 ++ python-client/windmill-api/README.md | 77 + python-client/windmill-api/pyproject.toml | 40 + .../windmill-api/windmill_api/__init__.py | 2 + .../windmill-api/windmill_api/api/__init__.py | 1 + .../windmill_api/api/audit/__init__.py | 0 .../windmill_api/api/audit/get_audit_log.py | 150 + .../windmill_api/api/audit/list_audit_logs.py | 280 ++ .../windmill_api/api/flow/__init__.py | 0 .../api/flow/archive_flow_by_path.py | 93 + .../windmill_api/api/flow/create_flow.py | 97 + .../api/flow/exists_flow_by_path.py | 148 + .../windmill_api/api/flow/get_flow_by_path.py | 150 + .../api/flow/get_hub_flow_by_id.py | 137 + .../windmill_api/api/flow/list_flows.py | 251 ++ .../windmill_api/api/flow/list_hub_flows.py | 116 + .../windmill_api/api/flow/update_flow.py | 104 + .../windmill_api/api/granular_acl/__init__.py | 0 .../api/granular_acl/add_granular_acls.py | 112 + .../api/granular_acl/get_granular_acls.py | 164 ++ .../api/granular_acl/remove_granular_acls.py | 114 + .../windmill_api/api/group/__init__.py | 0 .../api/group/add_user_to_group.py | 104 + .../windmill_api/api/group/create_group.py | 97 + .../windmill_api/api/group/delete_group.py | 93 + .../windmill_api/api/group/get_group.py | 150 + .../api/group/list_group_names.py | 136 + .../windmill_api/api/group/list_groups.py | 176 ++ .../api/group/remove_user_to_group.py | 104 + .../windmill_api/api/group/update_group.py | 104 + .../windmill_api/api/job/__init__.py | 0 .../windmill_api/api/job/cancel_queued_job.py | 104 + .../api/job/cancel_suspended_job.py | 104 + .../api/job/delete_completed_job.py | 150 + .../windmill_api/api/job/get_completed_job.py | 150 + .../windmill_api/api/job/get_job.py | 150 + .../windmill_api/api/job/get_job_updates.py | 184 ++ .../api/job/list_completed_jobs.py | 335 +++ .../windmill_api/api/job/list_jobs.py | 320 +++ .../windmill_api/api/job/list_queue.py | 305 +++ .../api/job/resume_suspended_job.py | 104 + .../windmill_api/api/job/run_flow_by_path.py | 140 + .../windmill_api/api/job/run_flow_preview.py | 97 + .../api/job/run_script_by_hash.py | 140 + .../api/job/run_script_by_path.py | 140 + .../api/job/run_script_preview.py | 97 + .../api/job/run_wait_result_script_by_path.py | 140 + .../windmill_api/api/oauth/__init__.py | 0 .../api/oauth/connect_callback.py | 154 ++ .../api/oauth/connect_slack_callback.py | 141 + .../windmill_api/api/oauth/create_account.py | 97 + .../api/oauth/disconnect_account.py | 93 + .../api/oauth/disconnect_slack.py | 86 + .../api/oauth/list_o_auth_connects.py | 75 + .../api/oauth/list_o_auth_logins.py | 115 + .../windmill_api/api/oauth/refresh_token.py | 104 + .../api/oauth/set_workspace_slack.py | 97 + .../windmill_api/api/resource/__init__.py | 0 .../api/resource/create_resource.py | 97 + .../api/resource/create_resource_type.py | 97 + .../api/resource/delete_resource.py | 93 + .../api/resource/delete_resource_type.py | 93 + .../api/resource/exists_resource.py | 148 + .../api/resource/exists_resource_type.py | 148 + .../windmill_api/api/resource/get_resource.py | 150 + .../api/resource/get_resource_type.py | 150 + .../api/resource/list_resource.py | 191 ++ .../api/resource/list_resource_type.py | 142 + .../api/resource/list_resource_type_names.py | 136 + .../api/resource/update_resource.py | 104 + .../api/resource/update_resource_type.py | 104 + .../windmill_api/api/schedule/__init__.py | 0 .../api/schedule/create_schedule.py | 97 + .../api/schedule/delete_schedule.py | 93 + .../api/schedule/exists_schedule.py | 148 + .../windmill_api/api/schedule/get_schedule.py | 150 + .../api/schedule/list_schedules.py | 176 ++ .../api/schedule/preview_schedule.py | 147 + .../api/schedule/set_schedule_enabled.py | 104 + .../api/schedule/update_schedule.py | 104 + .../windmill_api/api/script/__init__.py | 0 .../api/script/archive_script_by_hash.py | 150 + .../api/script/archive_script_by_path.py | 93 + .../windmill_api/api/script/create_script.py | 97 + .../api/script/delete_script_by_hash.py | 150 + .../api/script/deno_to_jsonschema.py | 140 + .../api/script/exists_script_by_path.py | 148 + .../script/get_hub_script_content_by_path.py | 86 + .../api/script/get_script_by_hash.py | 150 + .../api/script/get_script_by_path.py | 150 + .../script/get_script_deployment_status.py | 150 + .../api/script/go_to_jsonschema.py | 140 + .../api/script/list_hub_scripts.py | 116 + .../windmill_api/api/script/list_scripts.py | 326 +++ .../api/script/python_to_jsonschema.py | 140 + .../api/script/raw_script_by_hash.py | 93 + .../api/script/raw_script_by_path.py | 93 + .../windmill_api/api/settings/__init__.py | 0 .../api/settings/backend_version.py | 75 + .../api/settings/get_open_api_yaml.py | 75 + .../windmill_api/api/user/__init__.py | 0 .../windmill_api/api/user/accept_invite.py | 90 + .../windmill_api/api/user/create_token.py | 90 + .../windmill_api/api/user/create_user.py | 97 + .../api/user/create_user_globally.py | 90 + .../windmill_api/api/user/decline_invite.py | 90 + .../windmill_api/api/user/delete_token.py | 86 + .../windmill_api/api/user/delete_user.py | 93 + .../api/user/get_current_email.py | 75 + .../api/user/global_user_update.py | 97 + .../windmill_api/api/user/global_whoami.py | 116 + .../windmill_api/api/user/leave_workspace.py | 86 + .../windmill_api/api/user/list_tokens.py | 121 + .../windmill_api/api/user/list_usernames.py | 136 + .../windmill_api/api/user/list_users.py | 142 + .../api/user/list_users_as_super_admin.py | 163 ++ .../api/user/list_workspace_invites.py | 121 + .../windmill_api/api/user/login.py | 90 + .../windmill_api/api/user/login_with_oauth.py | 97 + .../windmill_api/api/user/logout.py | 75 + .../windmill_api/api/user/set_password.py | 90 + .../windmill_api/api/user/update_user.py | 104 + .../windmill_api/api/user/whoami.py | 137 + .../windmill_api/api/user/whois.py | 150 + .../windmill_api/api/variable/__init__.py | 0 .../api/variable/create_variable.py | 97 + .../api/variable/delete_variable.py | 93 + .../api/variable/exists_variable.py | 148 + .../windmill_api/api/variable/get_variable.py | 169 ++ .../api/variable/list_contextual_variables.py | 142 + .../api/variable/list_variable.py | 142 + .../api/variable/update_variable.py | 104 + .../windmill_api/api/worker/__init__.py | 0 .../windmill_api/api/worker/list_workers.py | 163 ++ .../windmill_api/api/workspace/__init__.py | 0 .../api/workspace/create_workspace.py | 90 + .../api/workspace/delete_invite.py | 97 + .../api/workspace/delete_workspace.py | 86 + .../api/workspace/edit_slack_command.py | 97 + .../api/workspace/exists_username.py | 90 + .../api/workspace/exists_workspace.py | 90 + .../api/workspace/get_settings.py | 137 + .../windmill_api/api/workspace/invite_user.py | 97 + .../api/workspace/list_pending_invites.py | 142 + .../api/workspace/list_user_workspaces.py | 116 + .../api/workspace/list_workspaces.py | 121 + .../list_workspaces_as_super_admin.py | 163 ++ .../windmill-api/windmill_api/client.py | 48 + .../windmill_api/models/__init__.py | 2409 +++++++++++++++++ .../models/accept_invite_json_body.py | 64 + .../models/add_granular_acls_json_body.py | 67 + .../models/add_granular_acls_kind.py | 13 + .../models/add_user_to_group_json_body.py | 57 + .../archive_script_by_hash_response_200.py | 206 ++ ...script_by_hash_response_200_extra_perms.py | 44 + ...rchive_script_by_hash_response_200_kind.py | 11 + ...ve_script_by_hash_response_200_language.py | 10 + ...hive_script_by_hash_response_200_schema.py | 44 + .../windmill_api/models/audit_log.py | 118 + .../models/audit_log_action_kind.py | 11 + .../models/audit_log_operation.py | 20 + .../models/audit_log_parameters.py | 44 + .../models/cancel_queued_job_json_body.py | 57 + .../models/cancel_suspended_job_json_body.py | 44 + .../models/cancel_suspended_job_payload.py | 44 + .../windmill_api/models/completed_job.py | 300 ++ .../windmill_api/models/completed_job_args.py | 44 + .../models/completed_job_flow_status.py | 102 + ...ompleted_job_flow_status_failure_module.py | 104 + ...job_flow_status_failure_module_iterator.py | 76 + ...ted_job_flow_status_failure_module_type.py | 13 + .../completed_job_flow_status_modules_item.py | 104 + ...d_job_flow_status_modules_item_iterator.py | 76 + ...leted_job_flow_status_modules_item_type.py | 13 + .../models/completed_job_flow_status_retry.py | 57 + .../models/completed_job_job_kind.py | 13 + .../models/completed_job_language.py | 10 + .../models/completed_job_raw_flow.py | 95 + .../completed_job_raw_flow_failure_module.py | 230 ++ ...aw_flow_failure_module_input_transforms.py | 107 + ...t_transforms_additional_property_type_0.py | 71 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 68 + ...nsforms_additional_property_type_1_type.py | 8 + ...leted_job_raw_flow_failure_module_retry.py | 84 + ..._raw_flow_failure_module_retry_constant.py | 65 + ...w_flow_failure_module_retry_exponential.py | 73 + ...ob_raw_flow_failure_module_sleep_type_0.py | 71 + ...w_flow_failure_module_sleep_type_0_type.py | 8 + ...ob_raw_flow_failure_module_sleep_type_1.py | 68 + ...w_flow_failure_module_sleep_type_1_type.py | 8 + ...b_raw_flow_failure_module_stop_after_if.py | 67 + ...ob_raw_flow_failure_module_value_type_0.py | 85 + ...ow_failure_module_value_type_0_language.py | 10 + ...ob_raw_flow_failure_module_value_type_1.py | 68 + ...w_flow_failure_module_value_type_1_type.py | 8 + ...ob_raw_flow_failure_module_value_type_2.py | 111 + ...ure_module_value_type_2_iterator_type_0.py | 71 + ...odule_value_type_2_iterator_type_0_type.py | 8 + ...ure_module_value_type_2_iterator_type_1.py | 68 + ...odule_value_type_2_iterator_type_1_type.py | 8 + ...w_flow_failure_module_value_type_2_type.py | 8 + ...ob_raw_flow_failure_module_value_type_3.py | 71 + ...w_flow_failure_module_value_type_3_type.py | 8 + .../completed_job_raw_flow_modules_item.py | 228 ++ ..._raw_flow_modules_item_input_transforms.py | 107 + ...t_transforms_additional_property_type_0.py | 71 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 68 + ...nsforms_additional_property_type_1_type.py | 8 + ...mpleted_job_raw_flow_modules_item_retry.py | 84 + ...ob_raw_flow_modules_item_retry_constant.py | 65 + ...raw_flow_modules_item_retry_exponential.py | 73 + ..._job_raw_flow_modules_item_sleep_type_0.py | 69 + ...raw_flow_modules_item_sleep_type_0_type.py | 8 + ..._job_raw_flow_modules_item_sleep_type_1.py | 66 + ...raw_flow_modules_item_sleep_type_1_type.py | 8 + ...job_raw_flow_modules_item_stop_after_if.py | 67 + ..._job_raw_flow_modules_item_value_type_0.py | 85 + ...flow_modules_item_value_type_0_language.py | 10 + ..._job_raw_flow_modules_item_value_type_1.py | 66 + ...raw_flow_modules_item_value_type_1_type.py | 8 + ..._job_raw_flow_modules_item_value_type_2.py | 108 + ...dules_item_value_type_2_iterator_type_0.py | 71 + ..._item_value_type_2_iterator_type_0_type.py | 8 + ...dules_item_value_type_2_iterator_type_1.py | 68 + ..._item_value_type_2_iterator_type_1_type.py | 8 + ...raw_flow_modules_item_value_type_2_type.py | 8 + ..._job_raw_flow_modules_item_value_type_3.py | 69 + ...raw_flow_modules_item_value_type_3_type.py | 8 + .../models/completed_job_result.py | 44 + .../models/connect_callback_json_body.py | 64 + .../models/connect_callback_response_200.py | 85 + .../connect_slack_callback_json_body.py | 64 + .../connect_slack_callback_response_200.py | 80 + ...connect_slack_callback_response_200_bot.py | 57 + .../models/contextual_variable.py | 71 + .../models/create_account_json_body.py | 78 + .../models/create_flow_json_body.py | 99 + .../models/create_flow_json_body_schema.py | 44 + .../models/create_flow_json_body_value.py | 95 + ...ate_flow_json_body_value_failure_module.py | 249 ++ ...y_value_failure_module_input_transforms.py | 107 + ...t_transforms_additional_property_type_0.py | 71 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 68 + ...nsforms_additional_property_type_1_type.py | 8 + ...ow_json_body_value_failure_module_retry.py | 86 + ...ody_value_failure_module_retry_constant.py | 65 + ..._value_failure_module_retry_exponential.py | 73 + ..._body_value_failure_module_sleep_type_0.py | 71 + ..._value_failure_module_sleep_type_0_type.py | 8 + ..._body_value_failure_module_sleep_type_1.py | 68 + ..._value_failure_module_sleep_type_1_type.py | 8 + ...body_value_failure_module_stop_after_if.py | 67 + ..._body_value_failure_module_value_type_0.py | 85 + ...ue_failure_module_value_type_0_language.py | 10 + ..._body_value_failure_module_value_type_1.py | 68 + ..._value_failure_module_value_type_1_type.py | 8 + ..._body_value_failure_module_value_type_2.py | 112 + ...ure_module_value_type_2_iterator_type_0.py | 71 + ...odule_value_type_2_iterator_type_0_type.py | 8 + ...ure_module_value_type_2_iterator_type_1.py | 68 + ...odule_value_type_2_iterator_type_1_type.py | 8 + ..._value_failure_module_value_type_2_type.py | 8 + ..._body_value_failure_module_value_type_3.py | 71 + ..._value_failure_module_value_type_3_type.py | 8 + ...reate_flow_json_body_value_modules_item.py | 235 ++ ...ody_value_modules_item_input_transforms.py | 107 + ...t_transforms_additional_property_type_0.py | 71 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 68 + ...nsforms_additional_property_type_1_type.py | 8 + ...flow_json_body_value_modules_item_retry.py | 86 + ..._body_value_modules_item_retry_constant.py | 65 + ...dy_value_modules_item_retry_exponential.py | 73 + ...on_body_value_modules_item_sleep_type_0.py | 71 + ...dy_value_modules_item_sleep_type_0_type.py | 8 + ...on_body_value_modules_item_sleep_type_1.py | 68 + ...dy_value_modules_item_sleep_type_1_type.py | 8 + ...n_body_value_modules_item_stop_after_if.py | 67 + ...on_body_value_modules_item_value_type_0.py | 85 + ...alue_modules_item_value_type_0_language.py | 10 + ...on_body_value_modules_item_value_type_1.py | 68 + ...dy_value_modules_item_value_type_1_type.py | 8 + ...on_body_value_modules_item_value_type_2.py | 112 + ...dules_item_value_type_2_iterator_type_0.py | 71 + ..._item_value_type_2_iterator_type_0_type.py | 8 + ...dules_item_value_type_2_iterator_type_1.py | 68 + ..._item_value_type_2_iterator_type_1_type.py | 8 + ...dy_value_modules_item_value_type_2_type.py | 8 + ...on_body_value_modules_item_value_type_3.py | 71 + ...dy_value_modules_item_value_type_3_type.py | 8 + .../models/create_group_json_body.py | 67 + .../windmill_api/models/create_resource.py | 91 + .../models/create_resource_json_body.py | 91 + .../models/create_resource_json_body_value.py | 44 + .../models/create_resource_type_json_body.py | 83 + .../models/create_resource_value.py | 44 + .../models/create_schedule_json_body.py | 105 + .../models/create_schedule_json_body_args.py | 44 + .../models/create_script_json_body.py | 149 + .../models/create_script_json_body_kind.py | 11 + .../create_script_json_body_language.py | 10 + .../models/create_script_json_body_schema.py | 44 + .../models/create_token_json_body.py | 74 + .../models/create_user_globally_json_body.py | 89 + .../models/create_user_json_body.py | 71 + .../windmill_api/models/create_variable.py | 96 + .../models/create_variable_json_body.py | 96 + .../windmill_api/models/create_workspace.py | 78 + .../models/create_workspace_json_body.py | 78 + .../models/decline_invite_json_body.py | 57 + .../delete_completed_job_response_200.py | 300 ++ .../delete_completed_job_response_200_args.py | 44 + ..._completed_job_response_200_flow_status.py | 106 + ...response_200_flow_status_failure_module.py | 108 + ...200_flow_status_failure_module_iterator.py | 76 + ...nse_200_flow_status_failure_module_type.py | 13 + ...b_response_200_flow_status_modules_item.py | 108 + ...e_200_flow_status_modules_item_iterator.py | 76 + ...ponse_200_flow_status_modules_item_type.py | 13 + ...eted_job_response_200_flow_status_retry.py | 57 + ...ete_completed_job_response_200_job_kind.py | 13 + ...ete_completed_job_response_200_language.py | 10 + ...ete_completed_job_response_200_raw_flow.py | 99 + ...ob_response_200_raw_flow_failure_module.py | 259 ++ ...aw_flow_failure_module_input_transforms.py | 113 + ...t_transforms_additional_property_type_0.py | 75 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 72 + ...nsforms_additional_property_type_1_type.py | 8 + ...ponse_200_raw_flow_failure_module_retry.py | 86 + ..._raw_flow_failure_module_retry_constant.py | 65 + ...w_flow_failure_module_retry_exponential.py | 73 + ...00_raw_flow_failure_module_sleep_type_0.py | 71 + ...w_flow_failure_module_sleep_type_0_type.py | 8 + ...00_raw_flow_failure_module_sleep_type_1.py | 68 + ...w_flow_failure_module_sleep_type_1_type.py | 8 + ...0_raw_flow_failure_module_stop_after_if.py | 67 + ...00_raw_flow_failure_module_value_type_0.py | 85 + ...ow_failure_module_value_type_0_language.py | 10 + ...00_raw_flow_failure_module_value_type_1.py | 68 + ...w_flow_failure_module_value_type_1_type.py | 8 + ...00_raw_flow_failure_module_value_type_2.py | 114 + ...ure_module_value_type_2_iterator_type_0.py | 71 + ...odule_value_type_2_iterator_type_0_type.py | 8 + ...ure_module_value_type_2_iterator_type_1.py | 68 + ...odule_value_type_2_iterator_type_1_type.py | 8 + ...w_flow_failure_module_value_type_2_type.py | 8 + ...00_raw_flow_failure_module_value_type_3.py | 71 + ...w_flow_failure_module_value_type_3_type.py | 8 + ..._job_response_200_raw_flow_modules_item.py | 259 ++ ..._raw_flow_modules_item_input_transforms.py | 113 + ...t_transforms_additional_property_type_0.py | 73 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 70 + ...nsforms_additional_property_type_1_type.py | 8 + ...esponse_200_raw_flow_modules_item_retry.py | 86 + ...00_raw_flow_modules_item_retry_constant.py | 65 + ...raw_flow_modules_item_retry_exponential.py | 73 + ..._200_raw_flow_modules_item_sleep_type_0.py | 71 + ...raw_flow_modules_item_sleep_type_0_type.py | 8 + ..._200_raw_flow_modules_item_sleep_type_1.py | 68 + ...raw_flow_modules_item_sleep_type_1_type.py | 8 + ...200_raw_flow_modules_item_stop_after_if.py | 67 + ..._200_raw_flow_modules_item_value_type_0.py | 85 + ...flow_modules_item_value_type_0_language.py | 10 + ..._200_raw_flow_modules_item_value_type_1.py | 68 + ...raw_flow_modules_item_value_type_1_type.py | 8 + ..._200_raw_flow_modules_item_value_type_2.py | 112 + ...dules_item_value_type_2_iterator_type_0.py | 71 + ..._item_value_type_2_iterator_type_0_type.py | 8 + ...dules_item_value_type_2_iterator_type_1.py | 68 + ..._item_value_type_2_iterator_type_1_type.py | 8 + ...raw_flow_modules_item_value_type_2_type.py | 8 + ..._200_raw_flow_modules_item_value_type_3.py | 71 + ...raw_flow_modules_item_value_type_3_type.py | 8 + ...elete_completed_job_response_200_result.py | 44 + .../models/delete_invite_json_body.py | 64 + .../delete_script_by_hash_response_200.py | 206 ++ ...script_by_hash_response_200_extra_perms.py | 44 + ...delete_script_by_hash_response_200_kind.py | 11 + ...te_script_by_hash_response_200_language.py | 10 + ...lete_script_by_hash_response_200_schema.py | 44 + .../models/deno_to_jsonschema_response_200.py | 85 + ...no_to_jsonschema_response_200_args_item.py | 157 ++ ...chema_response_200_args_item_typ_type_0.py | 16 + ...chema_response_200_args_item_typ_type_1.py | 57 + ...chema_response_200_args_item_typ_type_2.py | 60 + ...chema_response_200_args_item_typ_type_3.py | 70 + ...se_200_args_item_typ_type_3_object_item.py | 100 + ..._item_typ_type_3_object_item_typ_type_0.py | 16 + ..._item_typ_type_3_object_item_typ_type_1.py | 57 + ...chema_response_200_args_item_typ_type_4.py | 99 + ...se_200_args_item_typ_type_4_list_type_0.py | 16 + ...se_200_args_item_typ_type_4_list_type_1.py | 57 + .../windmill_api/models/edit_resource.py | 81 + .../windmill_api/models/edit_resource_type.py | 65 + .../models/edit_resource_value.py | 44 + .../windmill_api/models/edit_schedule.py | 80 + .../windmill_api/models/edit_schedule_args.py | 44 + .../models/edit_slack_command_json_body.py | 57 + .../windmill_api/models/edit_variable.py | 81 + .../models/edit_workspace_user.py | 57 + .../models/exists_username_json_body.py | 64 + .../models/exists_workspace_json_body.py | 57 + .../windmill-api/windmill_api/models/flow.py | 149 + .../windmill_api/models/flow_extra_perms.py | 44 + .../windmill_api/models/flow_metadata.py | 108 + .../models/flow_metadata_extra_perms.py | 44 + .../windmill_api/models/flow_module.py | 215 ++ .../models/flow_module_input_transforms.py | 94 + ...t_transforms_additional_property_type_0.py | 71 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 68 + ...nsforms_additional_property_type_1_type.py | 8 + .../windmill_api/models/flow_module_retry.py | 82 + .../models/flow_module_retry_constant.py | 65 + .../models/flow_module_retry_exponential.py | 73 + .../models/flow_module_sleep_type_0.py | 69 + .../models/flow_module_sleep_type_0_type.py | 8 + .../models/flow_module_sleep_type_1.py | 66 + .../models/flow_module_sleep_type_1_type.py | 8 + .../models/flow_module_stop_after_if.py | 67 + .../models/flow_module_value_type_0.py | 83 + .../flow_module_value_type_0_language.py | 10 + .../models/flow_module_value_type_1.py | 66 + .../models/flow_module_value_type_1_type.py | 8 + .../models/flow_module_value_type_2.py | 99 + ...low_module_value_type_2_iterator_type_0.py | 69 + ...odule_value_type_2_iterator_type_0_type.py | 8 + ...low_module_value_type_2_iterator_type_1.py | 66 + ...odule_value_type_2_iterator_type_1_type.py | 8 + .../models/flow_module_value_type_2_type.py | 8 + .../models/flow_module_value_type_3.py | 69 + .../models/flow_module_value_type_3_type.py | 8 + .../windmill_api/models/flow_preview.py | 78 + .../windmill_api/models/flow_preview_args.py | 44 + .../windmill_api/models/flow_preview_value.py | 95 + .../flow_preview_value_failure_module.py | 228 ++ ...w_value_failure_module_input_transforms.py | 107 + ...t_transforms_additional_property_type_0.py | 71 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 68 + ...nsforms_additional_property_type_1_type.py | 8 + ...flow_preview_value_failure_module_retry.py | 82 + ...iew_value_failure_module_retry_constant.py | 65 + ..._value_failure_module_retry_exponential.py | 73 + ...eview_value_failure_module_sleep_type_0.py | 69 + ..._value_failure_module_sleep_type_0_type.py | 8 + ...eview_value_failure_module_sleep_type_1.py | 66 + ..._value_failure_module_sleep_type_1_type.py | 8 + ...view_value_failure_module_stop_after_if.py | 67 + ...eview_value_failure_module_value_type_0.py | 85 + ...ue_failure_module_value_type_0_language.py | 10 + ...eview_value_failure_module_value_type_1.py | 66 + ..._value_failure_module_value_type_1_type.py | 8 + ...eview_value_failure_module_value_type_2.py | 108 + ...ure_module_value_type_2_iterator_type_0.py | 71 + ...odule_value_type_2_iterator_type_0_type.py | 8 + ...ure_module_value_type_2_iterator_type_1.py | 68 + ...odule_value_type_2_iterator_type_1_type.py | 8 + ..._value_failure_module_value_type_2_type.py | 8 + ...eview_value_failure_module_value_type_3.py | 69 + ..._value_failure_module_value_type_3_type.py | 8 + .../models/flow_preview_value_modules_item.py | 228 ++ ...iew_value_modules_item_input_transforms.py | 107 + ...t_transforms_additional_property_type_0.py | 71 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 68 + ...nsforms_additional_property_type_1_type.py | 8 + .../flow_preview_value_modules_item_retry.py | 82 + ...eview_value_modules_item_retry_constant.py | 65 + ...ew_value_modules_item_retry_exponential.py | 73 + ...preview_value_modules_item_sleep_type_0.py | 69 + ...ew_value_modules_item_sleep_type_0_type.py | 8 + ...preview_value_modules_item_sleep_type_1.py | 66 + ...ew_value_modules_item_sleep_type_1_type.py | 8 + ...review_value_modules_item_stop_after_if.py | 67 + ...preview_value_modules_item_value_type_0.py | 83 + ...alue_modules_item_value_type_0_language.py | 10 + ...preview_value_modules_item_value_type_1.py | 66 + ...ew_value_modules_item_value_type_1_type.py | 8 + ...preview_value_modules_item_value_type_2.py | 108 + ...dules_item_value_type_2_iterator_type_0.py | 71 + ..._item_value_type_2_iterator_type_0_type.py | 8 + ...dules_item_value_type_2_iterator_type_1.py | 68 + ..._item_value_type_2_iterator_type_1_type.py | 8 + ...ew_value_modules_item_value_type_2_type.py | 8 + ...preview_value_modules_item_value_type_3.py | 69 + ...ew_value_modules_item_value_type_3_type.py | 8 + .../windmill_api/models/flow_schema.py | 44 + .../windmill_api/models/flow_status.py | 102 + .../models/flow_status_failure_module.py | 104 + .../flow_status_failure_module_iterator.py | 76 + .../models/flow_status_failure_module_type.py | 13 + .../windmill_api/models/flow_status_module.py | 104 + .../models/flow_status_module_iterator.py | 76 + .../models/flow_status_module_type.py | 13 + .../models/flow_status_modules_item.py | 104 + .../flow_status_modules_item_iterator.py | 76 + .../models/flow_status_modules_item_type.py | 13 + .../windmill_api/models/flow_status_retry.py | 57 + .../windmill_api/models/flow_value.py | 95 + .../models/flow_value_failure_module.py | 228 ++ ...w_value_failure_module_input_transforms.py | 107 + ...t_transforms_additional_property_type_0.py | 71 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 68 + ...nsforms_additional_property_type_1_type.py | 8 + .../models/flow_value_failure_module_retry.py | 82 + ...low_value_failure_module_retry_constant.py | 65 + ..._value_failure_module_retry_exponential.py | 73 + .../flow_value_failure_module_sleep_type_0.py | 69 + ..._value_failure_module_sleep_type_0_type.py | 8 + .../flow_value_failure_module_sleep_type_1.py | 66 + ..._value_failure_module_sleep_type_1_type.py | 8 + ...flow_value_failure_module_stop_after_if.py | 67 + .../flow_value_failure_module_value_type_0.py | 83 + ...ue_failure_module_value_type_0_language.py | 10 + .../flow_value_failure_module_value_type_1.py | 66 + ..._value_failure_module_value_type_1_type.py | 8 + .../flow_value_failure_module_value_type_2.py | 103 + ...ure_module_value_type_2_iterator_type_0.py | 71 + ...odule_value_type_2_iterator_type_0_type.py | 8 + ...ure_module_value_type_2_iterator_type_1.py | 68 + ...odule_value_type_2_iterator_type_1_type.py | 8 + ..._value_failure_module_value_type_2_type.py | 8 + .../flow_value_failure_module_value_type_3.py | 69 + ..._value_failure_module_value_type_3_type.py | 8 + .../models/flow_value_modules_item.py | 226 ++ ...low_value_modules_item_input_transforms.py | 105 + ...t_transforms_additional_property_type_0.py | 71 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 68 + ...nsforms_additional_property_type_1_type.py | 8 + .../models/flow_value_modules_item_retry.py | 82 + .../flow_value_modules_item_retry_constant.py | 65 + ...ow_value_modules_item_retry_exponential.py | 73 + .../flow_value_modules_item_sleep_type_0.py | 69 + ...ow_value_modules_item_sleep_type_0_type.py | 8 + .../flow_value_modules_item_sleep_type_1.py | 66 + ...ow_value_modules_item_sleep_type_1_type.py | 8 + .../flow_value_modules_item_stop_after_if.py | 67 + .../flow_value_modules_item_value_type_0.py | 83 + ...alue_modules_item_value_type_0_language.py | 10 + .../flow_value_modules_item_value_type_1.py | 66 + ...ow_value_modules_item_value_type_1_type.py | 8 + .../flow_value_modules_item_value_type_2.py | 99 + ...dules_item_value_type_2_iterator_type_0.py | 71 + ..._item_value_type_2_iterator_type_0_type.py | 8 + ...dules_item_value_type_2_iterator_type_1.py | 68 + ..._item_value_type_2_iterator_type_1_type.py | 8 + ...ow_value_modules_item_value_type_2_type.py | 8 + .../flow_value_modules_item_value_type_3.py | 69 + ...ow_value_modules_item_value_type_3_type.py | 8 + .../windmill_api/models/forloop_flow.py | 97 + .../models/forloop_flow_iterator_type_0.py | 69 + .../forloop_flow_iterator_type_0_type.py | 8 + .../models/forloop_flow_iterator_type_1.py | 66 + .../forloop_flow_iterator_type_1_type.py | 8 + .../windmill_api/models/forloop_flow_type.py | 8 + .../models/get_audit_log_response_200.py | 118 + .../get_audit_log_response_200_action_kind.py | 11 + .../get_audit_log_response_200_operation.py | 20 + .../get_audit_log_response_200_parameters.py | 44 + .../models/get_completed_job_response_200.py | 300 ++ .../get_completed_job_response_200_args.py | 44 + ..._completed_job_response_200_flow_status.py | 106 + ...response_200_flow_status_failure_module.py | 108 + ...200_flow_status_failure_module_iterator.py | 76 + ...nse_200_flow_status_failure_module_type.py | 13 + ...b_response_200_flow_status_modules_item.py | 108 + ...e_200_flow_status_modules_item_iterator.py | 76 + ...ponse_200_flow_status_modules_item_type.py | 13 + ...eted_job_response_200_flow_status_retry.py | 57 + ...get_completed_job_response_200_job_kind.py | 13 + ...get_completed_job_response_200_language.py | 10 + ...get_completed_job_response_200_raw_flow.py | 97 + ...ob_response_200_raw_flow_failure_module.py | 259 ++ ...aw_flow_failure_module_input_transforms.py | 111 + ...t_transforms_additional_property_type_0.py | 73 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 70 + ...nsforms_additional_property_type_1_type.py | 8 + ...ponse_200_raw_flow_failure_module_retry.py | 86 + ..._raw_flow_failure_module_retry_constant.py | 65 + ...w_flow_failure_module_retry_exponential.py | 73 + ...00_raw_flow_failure_module_sleep_type_0.py | 71 + ...w_flow_failure_module_sleep_type_0_type.py | 8 + ...00_raw_flow_failure_module_sleep_type_1.py | 68 + ...w_flow_failure_module_sleep_type_1_type.py | 8 + ...0_raw_flow_failure_module_stop_after_if.py | 67 + ...00_raw_flow_failure_module_value_type_0.py | 85 + ...ow_failure_module_value_type_0_language.py | 10 + ...00_raw_flow_failure_module_value_type_1.py | 68 + ...w_flow_failure_module_value_type_1_type.py | 8 + ...00_raw_flow_failure_module_value_type_2.py | 112 + ...ure_module_value_type_2_iterator_type_0.py | 71 + ...odule_value_type_2_iterator_type_0_type.py | 8 + ...ure_module_value_type_2_iterator_type_1.py | 68 + ...odule_value_type_2_iterator_type_1_type.py | 8 + ...w_flow_failure_module_value_type_2_type.py | 8 + ...00_raw_flow_failure_module_value_type_3.py | 71 + ...w_flow_failure_module_value_type_3_type.py | 8 + ..._job_response_200_raw_flow_modules_item.py | 258 ++ ..._raw_flow_modules_item_input_transforms.py | 111 + ...t_transforms_additional_property_type_0.py | 73 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 70 + ...nsforms_additional_property_type_1_type.py | 8 + ...esponse_200_raw_flow_modules_item_retry.py | 86 + ...00_raw_flow_modules_item_retry_constant.py | 65 + ...raw_flow_modules_item_retry_exponential.py | 73 + ..._200_raw_flow_modules_item_sleep_type_0.py | 71 + ...raw_flow_modules_item_sleep_type_0_type.py | 8 + ..._200_raw_flow_modules_item_sleep_type_1.py | 68 + ...raw_flow_modules_item_sleep_type_1_type.py | 8 + ...200_raw_flow_modules_item_stop_after_if.py | 67 + ..._200_raw_flow_modules_item_value_type_0.py | 85 + ...flow_modules_item_value_type_0_language.py | 10 + ..._200_raw_flow_modules_item_value_type_1.py | 68 + ...raw_flow_modules_item_value_type_1_type.py | 8 + ..._200_raw_flow_modules_item_value_type_2.py | 112 + ...dules_item_value_type_2_iterator_type_0.py | 71 + ..._item_value_type_2_iterator_type_0_type.py | 8 + ...dules_item_value_type_2_iterator_type_1.py | 68 + ..._item_value_type_2_iterator_type_1_type.py | 8 + ...raw_flow_modules_item_value_type_2_type.py | 8 + ..._200_raw_flow_modules_item_value_type_3.py | 71 + ...raw_flow_modules_item_value_type_3_type.py | 8 + .../get_completed_job_response_200_result.py | 44 + .../models/get_flow_by_path_response_200.py | 149 + ...t_flow_by_path_response_200_extra_perms.py | 44 + .../get_flow_by_path_response_200_schema.py | 44 + .../get_flow_by_path_response_200_value.py | 95 + ..._path_response_200_value_failure_module.py | 258 ++ ...0_value_failure_module_input_transforms.py | 109 + ...t_transforms_additional_property_type_0.py | 73 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 70 + ...nsforms_additional_property_type_1_type.py | 8 + ...response_200_value_failure_module_retry.py | 86 + ...200_value_failure_module_retry_constant.py | 65 + ..._value_failure_module_retry_exponential.py | 73 + ...e_200_value_failure_module_sleep_type_0.py | 71 + ..._value_failure_module_sleep_type_0_type.py | 8 + ...e_200_value_failure_module_sleep_type_1.py | 68 + ..._value_failure_module_sleep_type_1_type.py | 8 + ..._200_value_failure_module_stop_after_if.py | 67 + ...e_200_value_failure_module_value_type_0.py | 85 + ...ue_failure_module_value_type_0_language.py | 10 + ...e_200_value_failure_module_value_type_1.py | 68 + ..._value_failure_module_value_type_1_type.py | 8 + ...e_200_value_failure_module_value_type_2.py | 112 + ...ure_module_value_type_2_iterator_type_0.py | 71 + ...odule_value_type_2_iterator_type_0_type.py | 8 + ...ure_module_value_type_2_iterator_type_1.py | 68 + ...odule_value_type_2_iterator_type_1_type.py | 8 + ..._value_failure_module_value_type_2_type.py | 8 + ...e_200_value_failure_module_value_type_3.py | 71 + ..._value_failure_module_value_type_3_type.py | 8 + ...by_path_response_200_value_modules_item.py | 254 ++ ...200_value_modules_item_input_transforms.py | 107 + ...t_transforms_additional_property_type_0.py | 73 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 70 + ...nsforms_additional_property_type_1_type.py | 8 + ...h_response_200_value_modules_item_retry.py | 86 + ...e_200_value_modules_item_retry_constant.py | 65 + ...00_value_modules_item_retry_exponential.py | 73 + ...nse_200_value_modules_item_sleep_type_0.py | 71 + ...00_value_modules_item_sleep_type_0_type.py | 8 + ...nse_200_value_modules_item_sleep_type_1.py | 68 + ...00_value_modules_item_sleep_type_1_type.py | 8 + ...se_200_value_modules_item_stop_after_if.py | 67 + ...nse_200_value_modules_item_value_type_0.py | 85 + ...alue_modules_item_value_type_0_language.py | 10 + ...nse_200_value_modules_item_value_type_1.py | 68 + ...00_value_modules_item_value_type_1_type.py | 8 + ...nse_200_value_modules_item_value_type_2.py | 112 + ...dules_item_value_type_2_iterator_type_0.py | 71 + ..._item_value_type_2_iterator_type_0_type.py | 8 + ...dules_item_value_type_2_iterator_type_1.py | 68 + ..._item_value_type_2_iterator_type_1_type.py | 8 + ...00_value_modules_item_value_type_2_type.py | 8 + ...nse_200_value_modules_item_value_type_3.py | 71 + ...00_value_modules_item_value_type_3_type.py | 8 + .../models/get_granular_acls_kind.py | 13 + .../models/get_granular_acls_response_200.py | 44 + .../models/get_group_response_200.py | 94 + .../get_group_response_200_extra_perms.py | 44 + .../models/get_hub_flow_by_id_response_200.py | 65 + .../get_hub_flow_by_id_response_200_flow.py | 92 + ...hub_flow_by_id_response_200_flow_schema.py | 44 + ..._hub_flow_by_id_response_200_flow_value.py | 99 + ..._response_200_flow_value_failure_module.py | 259 ++ ...w_value_failure_module_input_transforms.py | 113 + ...t_transforms_additional_property_type_0.py | 73 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 70 + ...nsforms_additional_property_type_1_type.py | 8 + ...nse_200_flow_value_failure_module_retry.py | 86 + ...low_value_failure_module_retry_constant.py | 65 + ..._value_failure_module_retry_exponential.py | 73 + ..._flow_value_failure_module_sleep_type_0.py | 71 + ..._value_failure_module_sleep_type_0_type.py | 8 + ..._flow_value_failure_module_sleep_type_1.py | 68 + ..._value_failure_module_sleep_type_1_type.py | 8 + ...flow_value_failure_module_stop_after_if.py | 67 + ..._flow_value_failure_module_value_type_0.py | 85 + ...ue_failure_module_value_type_0_language.py | 10 + ..._flow_value_failure_module_value_type_1.py | 68 + ..._value_failure_module_value_type_1_type.py | 8 + ..._flow_value_failure_module_value_type_2.py | 112 + ...ure_module_value_type_2_iterator_type_0.py | 71 + ...odule_value_type_2_iterator_type_0_type.py | 8 + ...ure_module_value_type_2_iterator_type_1.py | 68 + ...odule_value_type_2_iterator_type_1_type.py | 8 + ..._value_failure_module_value_type_2_type.py | 8 + ..._flow_value_failure_module_value_type_3.py | 71 + ..._value_failure_module_value_type_3_type.py | 8 + ...id_response_200_flow_value_modules_item.py | 259 ++ ...low_value_modules_item_input_transforms.py | 111 + ...t_transforms_additional_property_type_0.py | 73 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 70 + ...nsforms_additional_property_type_1_type.py | 8 + ...ponse_200_flow_value_modules_item_retry.py | 86 + ..._flow_value_modules_item_retry_constant.py | 65 + ...ow_value_modules_item_retry_exponential.py | 73 + ...00_flow_value_modules_item_sleep_type_0.py | 71 + ...ow_value_modules_item_sleep_type_0_type.py | 8 + ...00_flow_value_modules_item_sleep_type_1.py | 68 + ...ow_value_modules_item_sleep_type_1_type.py | 8 + ...0_flow_value_modules_item_stop_after_if.py | 67 + ...00_flow_value_modules_item_value_type_0.py | 85 + ...alue_modules_item_value_type_0_language.py | 10 + ...00_flow_value_modules_item_value_type_1.py | 68 + ...ow_value_modules_item_value_type_1_type.py | 8 + ...00_flow_value_modules_item_value_type_2.py | 112 + ...dules_item_value_type_2_iterator_type_0.py | 71 + ..._item_value_type_2_iterator_type_0_type.py | 8 + ...dules_item_value_type_2_iterator_type_1.py | 68 + ..._item_value_type_2_iterator_type_1_type.py | 8 + ...ow_value_modules_item_value_type_2_type.py | 8 + ...00_flow_value_modules_item_value_type_3.py | 71 + ...ow_value_modules_item_value_type_3_type.py | 8 + .../models/get_job_response_200.py | 65 + .../models/get_job_response_200_type.py | 9 + .../models/get_job_updates_response_200.py | 73 + .../models/get_resource_response_200.py | 122 + .../get_resource_response_200_extra_perms.py | 44 + .../models/get_resource_response_200_value.py | 44 + .../models/get_resource_type_response_200.py | 83 + .../models/get_schedule_response_200.py | 136 + .../models/get_schedule_response_200_args.py | 44 + .../get_schedule_response_200_extra_perms.py | 44 + .../models/get_script_by_hash_response_200.py | 206 ++ ...script_by_hash_response_200_extra_perms.py | 44 + .../get_script_by_hash_response_200_kind.py | 11 + ...et_script_by_hash_response_200_language.py | 10 + .../get_script_by_hash_response_200_schema.py | 44 + .../models/get_script_by_path_response_200.py | 206 ++ ...script_by_path_response_200_extra_perms.py | 44 + .../get_script_by_path_response_200_kind.py | 11 + ...et_script_by_path_response_200_language.py | 10 + .../get_script_by_path_response_200_schema.py | 44 + ...t_script_deployment_status_response_200.py | 65 + .../models/get_settings_response_200.py | 81 + .../models/get_variable_response_200.py | 114 + .../get_variable_response_200_extra_perms.py | 44 + .../windmill_api/models/global_user_info.py | 98 + .../models/global_user_info_login_type.py | 9 + .../models/global_user_update_json_body.py | 57 + .../models/global_whoami_response_200.py | 98 + .../global_whoami_response_200_login_type.py | 9 + .../models/go_to_jsonschema_response_200.py | 85 + ...go_to_jsonschema_response_200_args_item.py | 157 ++ ...chema_response_200_args_item_typ_type_0.py | 16 + ...chema_response_200_args_item_typ_type_1.py | 57 + ...chema_response_200_args_item_typ_type_2.py | 60 + ...chema_response_200_args_item_typ_type_3.py | 70 + ...se_200_args_item_typ_type_3_object_item.py | 100 + ..._item_typ_type_3_object_item_typ_type_0.py | 16 + ..._item_typ_type_3_object_item_typ_type_1.py | 57 + ...chema_response_200_args_item_typ_type_4.py | 97 + ...se_200_args_item_typ_type_4_list_type_0.py | 16 + ...se_200_args_item_typ_type_4_list_type_1.py | 57 + .../windmill-api/windmill_api/models/group.py | 94 + .../windmill_api/models/group_extra_perms.py | 44 + .../models/input_transform_type_0.py | 69 + .../models/input_transform_type_0_type.py | 8 + .../models/input_transform_type_1.py | 66 + .../models/input_transform_type_1_type.py | 8 + .../models/invite_user_json_body.py | 64 + .../models/javascript_transform.py | 66 + .../models/javascript_transform_type.py | 8 + .../windmill-api/windmill_api/models/job.py | 65 + .../windmill_api/models/job_type.py | 9 + .../models/list_audit_logs_action_kind.py | 11 + .../list_audit_logs_response_200_item.py | 118 + ...udit_logs_response_200_item_action_kind.py | 11 + ..._audit_logs_response_200_item_operation.py | 20 + ...audit_logs_response_200_item_parameters.py | 44 + .../list_completed_jobs_response_200_item.py | 300 ++ ...t_completed_jobs_response_200_item_args.py | 44 + ...eted_jobs_response_200_item_flow_status.py | 108 + ...nse_200_item_flow_status_failure_module.py | 108 + ...tem_flow_status_failure_module_iterator.py | 76 + ...00_item_flow_status_failure_module_type.py | 13 + ...ponse_200_item_flow_status_modules_item.py | 108 + ..._item_flow_status_modules_item_iterator.py | 76 + ..._200_item_flow_status_modules_item_type.py | 13 + ...obs_response_200_item_flow_status_retry.py | 57 + ...mpleted_jobs_response_200_item_job_kind.py | 13 + ...mpleted_jobs_response_200_item_language.py | 10 + ...mpleted_jobs_response_200_item_raw_flow.py | 99 + ...sponse_200_item_raw_flow_failure_module.py | 261 ++ ...aw_flow_failure_module_input_transforms.py | 111 + ...t_transforms_additional_property_type_0.py | 75 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 72 + ...nsforms_additional_property_type_1_type.py | 8 + ..._200_item_raw_flow_failure_module_retry.py | 86 + ..._raw_flow_failure_module_retry_constant.py | 65 + ...w_flow_failure_module_retry_exponential.py | 73 + ...em_raw_flow_failure_module_sleep_type_0.py | 71 + ...w_flow_failure_module_sleep_type_0_type.py | 8 + ...em_raw_flow_failure_module_sleep_type_1.py | 68 + ...w_flow_failure_module_sleep_type_1_type.py | 8 + ...m_raw_flow_failure_module_stop_after_if.py | 67 + ...em_raw_flow_failure_module_value_type_0.py | 85 + ...ow_failure_module_value_type_0_language.py | 10 + ...em_raw_flow_failure_module_value_type_1.py | 68 + ...w_flow_failure_module_value_type_1_type.py | 8 + ...em_raw_flow_failure_module_value_type_2.py | 116 + ...ure_module_value_type_2_iterator_type_0.py | 73 + ...odule_value_type_2_iterator_type_0_type.py | 8 + ...ure_module_value_type_2_iterator_type_1.py | 70 + ...odule_value_type_2_iterator_type_1_type.py | 8 + ...w_flow_failure_module_value_type_2_type.py | 8 + ...em_raw_flow_failure_module_value_type_3.py | 71 + ...w_flow_failure_module_value_type_3_type.py | 8 + ...response_200_item_raw_flow_modules_item.py | 259 ++ ..._raw_flow_modules_item_input_transforms.py | 113 + ...t_transforms_additional_property_type_0.py | 75 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 72 + ...nsforms_additional_property_type_1_type.py | 8 + ...se_200_item_raw_flow_modules_item_retry.py | 86 + ...em_raw_flow_modules_item_retry_constant.py | 65 + ...raw_flow_modules_item_retry_exponential.py | 73 + ...item_raw_flow_modules_item_sleep_type_0.py | 71 + ...raw_flow_modules_item_sleep_type_0_type.py | 8 + ...item_raw_flow_modules_item_sleep_type_1.py | 68 + ...raw_flow_modules_item_sleep_type_1_type.py | 8 + ...tem_raw_flow_modules_item_stop_after_if.py | 67 + ...item_raw_flow_modules_item_value_type_0.py | 85 + ...flow_modules_item_value_type_0_language.py | 10 + ...item_raw_flow_modules_item_value_type_1.py | 68 + ...raw_flow_modules_item_value_type_1_type.py | 8 + ...item_raw_flow_modules_item_value_type_2.py | 114 + ...dules_item_value_type_2_iterator_type_0.py | 73 + ..._item_value_type_2_iterator_type_0_type.py | 8 + ...dules_item_value_type_2_iterator_type_1.py | 70 + ..._item_value_type_2_iterator_type_1_type.py | 8 + ...raw_flow_modules_item_value_type_2_type.py | 8 + ...item_raw_flow_modules_item_value_type_3.py | 71 + ...raw_flow_modules_item_value_type_3_type.py | 8 + ...completed_jobs_response_200_item_result.py | 44 + ..._contextual_variables_response_200_item.py | 71 + .../models/list_flows_response_200_item.py | 149 + ...ist_flows_response_200_item_extra_perms.py | 44 + .../list_flows_response_200_item_schema.py | 44 + .../list_flows_response_200_item_value.py | 95 + ..._response_200_item_value_failure_module.py | 258 ++ ...m_value_failure_module_input_transforms.py | 107 + ...t_transforms_additional_property_type_0.py | 73 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 70 + ...nsforms_additional_property_type_1_type.py | 8 + ...nse_200_item_value_failure_module_retry.py | 86 + ...tem_value_failure_module_retry_constant.py | 65 + ..._value_failure_module_retry_exponential.py | 73 + ..._item_value_failure_module_sleep_type_0.py | 71 + ..._value_failure_module_sleep_type_0_type.py | 8 + ..._item_value_failure_module_sleep_type_1.py | 68 + ..._value_failure_module_sleep_type_1_type.py | 8 + ...item_value_failure_module_stop_after_if.py | 67 + ..._item_value_failure_module_value_type_0.py | 85 + ...ue_failure_module_value_type_0_language.py | 10 + ..._item_value_failure_module_value_type_1.py | 68 + ..._value_failure_module_value_type_1_type.py | 8 + ..._item_value_failure_module_value_type_2.py | 112 + ...ure_module_value_type_2_iterator_type_0.py | 71 + ...odule_value_type_2_iterator_type_0_type.py | 8 + ...ure_module_value_type_2_iterator_type_1.py | 68 + ...odule_value_type_2_iterator_type_1_type.py | 8 + ..._value_failure_module_value_type_2_type.py | 8 + ..._item_value_failure_module_value_type_3.py | 71 + ..._value_failure_module_value_type_3_type.py | 8 + ...ws_response_200_item_value_modules_item.py | 252 ++ ...tem_value_modules_item_input_transforms.py | 107 + ...t_transforms_additional_property_type_0.py | 73 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 70 + ...nsforms_additional_property_type_1_type.py | 8 + ...ponse_200_item_value_modules_item_retry.py | 86 + ..._item_value_modules_item_retry_constant.py | 65 + ...em_value_modules_item_retry_exponential.py | 73 + ...00_item_value_modules_item_sleep_type_0.py | 71 + ...em_value_modules_item_sleep_type_0_type.py | 8 + ...00_item_value_modules_item_sleep_type_1.py | 68 + ...em_value_modules_item_sleep_type_1_type.py | 8 + ...0_item_value_modules_item_stop_after_if.py | 67 + ...00_item_value_modules_item_value_type_0.py | 85 + ...alue_modules_item_value_type_0_language.py | 10 + ...00_item_value_modules_item_value_type_1.py | 68 + ...em_value_modules_item_value_type_1_type.py | 8 + ...00_item_value_modules_item_value_type_2.py | 112 + ...dules_item_value_type_2_iterator_type_0.py | 71 + ..._item_value_type_2_iterator_type_0_type.py | 8 + ...dules_item_value_type_2_iterator_type_1.py | 68 + ..._item_value_type_2_iterator_type_1_type.py | 8 + ...em_value_modules_item_value_type_2_type.py | 8 + ...00_item_value_modules_item_value_type_3.py | 71 + ...em_value_modules_item_value_type_3_type.py | 8 + .../models/list_groups_response_200_item.py | 94 + ...st_groups_response_200_item_extra_perms.py | 44 + .../models/list_hub_flows_response_200.py | 69 + .../list_hub_flows_response_200_flows_item.py | 93 + .../models/list_hub_scripts_response_200.py | 69 + ...list_hub_scripts_response_200_asks_item.py | 109 + ...hub_scripts_response_200_asks_item_kind.py | 11 + .../models/list_jobs_response_200_item.py | 65 + .../list_jobs_response_200_item_type.py | 9 + .../list_pending_invites_response_200_item.py | 71 + .../models/list_queue_response_200_item.py | 310 +++ .../list_queue_response_200_item_args.py | 44 + ...ist_queue_response_200_item_flow_status.py | 104 + ...nse_200_item_flow_status_failure_module.py | 108 + ...tem_flow_status_failure_module_iterator.py | 76 + ...00_item_flow_status_failure_module_type.py | 13 + ...ponse_200_item_flow_status_modules_item.py | 108 + ..._item_flow_status_modules_item_iterator.py | 76 + ..._200_item_flow_status_modules_item_type.py | 13 + ...eue_response_200_item_flow_status_retry.py | 57 + .../list_queue_response_200_item_job_kind.py | 13 + .../list_queue_response_200_item_language.py | 10 + .../list_queue_response_200_item_raw_flow.py | 95 + ...sponse_200_item_raw_flow_failure_module.py | 258 ++ ...aw_flow_failure_module_input_transforms.py | 111 + ...t_transforms_additional_property_type_0.py | 73 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 70 + ...nsforms_additional_property_type_1_type.py | 8 + ..._200_item_raw_flow_failure_module_retry.py | 86 + ..._raw_flow_failure_module_retry_constant.py | 65 + ...w_flow_failure_module_retry_exponential.py | 73 + ...em_raw_flow_failure_module_sleep_type_0.py | 71 + ...w_flow_failure_module_sleep_type_0_type.py | 8 + ...em_raw_flow_failure_module_sleep_type_1.py | 68 + ...w_flow_failure_module_sleep_type_1_type.py | 8 + ...m_raw_flow_failure_module_stop_after_if.py | 67 + ...em_raw_flow_failure_module_value_type_0.py | 85 + ...ow_failure_module_value_type_0_language.py | 10 + ...em_raw_flow_failure_module_value_type_1.py | 68 + ...w_flow_failure_module_value_type_1_type.py | 8 + ...em_raw_flow_failure_module_value_type_2.py | 112 + ...ure_module_value_type_2_iterator_type_0.py | 71 + ...odule_value_type_2_iterator_type_0_type.py | 8 + ...ure_module_value_type_2_iterator_type_1.py | 68 + ...odule_value_type_2_iterator_type_1_type.py | 8 + ...w_flow_failure_module_value_type_2_type.py | 8 + ...em_raw_flow_failure_module_value_type_3.py | 71 + ...w_flow_failure_module_value_type_3_type.py | 8 + ...response_200_item_raw_flow_modules_item.py | 258 ++ ..._raw_flow_modules_item_input_transforms.py | 109 + ...t_transforms_additional_property_type_0.py | 73 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 70 + ...nsforms_additional_property_type_1_type.py | 8 + ...se_200_item_raw_flow_modules_item_retry.py | 86 + ...em_raw_flow_modules_item_retry_constant.py | 65 + ...raw_flow_modules_item_retry_exponential.py | 73 + ...item_raw_flow_modules_item_sleep_type_0.py | 71 + ...raw_flow_modules_item_sleep_type_0_type.py | 8 + ...item_raw_flow_modules_item_sleep_type_1.py | 68 + ...raw_flow_modules_item_sleep_type_1_type.py | 8 + ...tem_raw_flow_modules_item_stop_after_if.py | 67 + ...item_raw_flow_modules_item_value_type_0.py | 85 + ...flow_modules_item_value_type_0_language.py | 10 + ...item_raw_flow_modules_item_value_type_1.py | 68 + ...raw_flow_modules_item_value_type_1_type.py | 8 + ...item_raw_flow_modules_item_value_type_2.py | 112 + ...dules_item_value_type_2_iterator_type_0.py | 71 + ..._item_value_type_2_iterator_type_0_type.py | 8 + ...dules_item_value_type_2_iterator_type_1.py | 68 + ..._item_value_type_2_iterator_type_1_type.py | 8 + ...raw_flow_modules_item_value_type_2_type.py | 8 + ...item_raw_flow_modules_item_value_type_3.py | 71 + ...raw_flow_modules_item_value_type_3_type.py | 8 + .../models/list_resource_response_200_item.py | 122 + ..._resource_response_200_item_extra_perms.py | 44 + .../list_resource_response_200_item_value.py | 44 + .../list_resource_type_response_200_item.py | 83 + .../list_schedules_response_200_item.py | 136 + .../list_schedules_response_200_item_args.py | 44 + ...schedules_response_200_item_extra_perms.py | 44 + .../models/list_scripts_response_200_item.py | 206 ++ ...t_scripts_response_200_item_extra_perms.py | 44 + .../list_scripts_response_200_item_kind.py | 11 + ...list_scripts_response_200_item_language.py | 10 + .../list_scripts_response_200_item_schema.py | 44 + .../models/list_tokens_response_200_item.py | 100 + .../list_user_workspaces_response_200.py | 75 + ...workspaces_response_200_workspaces_item.py | 71 + ..._users_as_super_admin_response_200_item.py | 100 + ...uper_admin_response_200_item_login_type.py | 9 + .../models/list_users_response_200_item.py | 131 + .../list_users_response_200_item_usage.py | 73 + .../models/list_variable_response_200_item.py | 114 + ..._variable_response_200_item_extra_perms.py | 44 + .../models/list_workers_response_200_item.py | 96 + ...ist_workspace_invites_response_200_item.py | 71 + ...spaces_as_super_admin_response_200_item.py | 81 + .../list_workspaces_response_200_item.py | 81 + .../windmill_api/models/listable_variable.py | 114 + .../models/listable_variable_extra_perms.py | 44 + .../windmill-api/windmill_api/models/login.py | 64 + .../windmill_api/models/login_json_body.py | 64 + .../models/login_with_oauth_json_body.py | 65 + .../windmill_api/models/main_arg_signature.py | 85 + .../models/main_arg_signature_args_item.py | 156 ++ ...main_arg_signature_args_item_typ_type_0.py | 16 + ...main_arg_signature_args_item_typ_type_1.py | 57 + ...main_arg_signature_args_item_typ_type_2.py | 60 + ...main_arg_signature_args_item_typ_type_3.py | 68 + ...nature_args_item_typ_type_3_object_item.py | 96 + ..._item_typ_type_3_object_item_typ_type_0.py | 16 + ..._item_typ_type_3_object_item_typ_type_1.py | 57 + ...main_arg_signature_args_item_typ_type_4.py | 88 + ...nature_args_item_typ_type_4_list_type_0.py | 16 + ...nature_args_item_typ_type_4_list_type_1.py | 57 + .../windmill_api/models/new_schedule.py | 105 + .../windmill_api/models/new_schedule_args.py | 44 + .../windmill_api/models/new_token.py | 74 + .../windmill_api/models/new_user.py | 71 + .../windmill_api/models/open_flow.py | 92 + .../windmill_api/models/open_flow_schema.py | 44 + .../windmill_api/models/open_flow_value.py | 95 + .../models/open_flow_value_failure_module.py | 228 ++ ...w_value_failure_module_input_transforms.py | 107 + ...t_transforms_additional_property_type_0.py | 71 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 68 + ...nsforms_additional_property_type_1_type.py | 8 + .../open_flow_value_failure_module_retry.py | 82 + ...low_value_failure_module_retry_constant.py | 65 + ..._value_failure_module_retry_exponential.py | 73 + ..._flow_value_failure_module_sleep_type_0.py | 69 + ..._value_failure_module_sleep_type_0_type.py | 8 + ..._flow_value_failure_module_sleep_type_1.py | 66 + ..._value_failure_module_sleep_type_1_type.py | 8 + ...flow_value_failure_module_stop_after_if.py | 67 + ..._flow_value_failure_module_value_type_0.py | 83 + ...ue_failure_module_value_type_0_language.py | 10 + ..._flow_value_failure_module_value_type_1.py | 66 + ..._value_failure_module_value_type_1_type.py | 8 + ..._flow_value_failure_module_value_type_2.py | 108 + ...ure_module_value_type_2_iterator_type_0.py | 71 + ...odule_value_type_2_iterator_type_0_type.py | 8 + ...ure_module_value_type_2_iterator_type_1.py | 68 + ...odule_value_type_2_iterator_type_1_type.py | 8 + ..._value_failure_module_value_type_2_type.py | 8 + ..._flow_value_failure_module_value_type_3.py | 69 + ..._value_failure_module_value_type_3_type.py | 8 + .../models/open_flow_value_modules_item.py | 228 ++ ...low_value_modules_item_input_transforms.py | 107 + ...t_transforms_additional_property_type_0.py | 71 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 68 + ...nsforms_additional_property_type_1_type.py | 8 + .../open_flow_value_modules_item_retry.py | 82 + ..._flow_value_modules_item_retry_constant.py | 65 + ...ow_value_modules_item_retry_exponential.py | 73 + ...en_flow_value_modules_item_sleep_type_0.py | 69 + ...ow_value_modules_item_sleep_type_0_type.py | 8 + ...en_flow_value_modules_item_sleep_type_1.py | 66 + ...ow_value_modules_item_sleep_type_1_type.py | 8 + ...n_flow_value_modules_item_stop_after_if.py | 67 + ...en_flow_value_modules_item_value_type_0.py | 83 + ...alue_modules_item_value_type_0_language.py | 10 + ...en_flow_value_modules_item_value_type_1.py | 66 + ...ow_value_modules_item_value_type_1_type.py | 8 + ...en_flow_value_modules_item_value_type_2.py | 104 + ...dules_item_value_type_2_iterator_type_0.py | 71 + ..._item_value_type_2_iterator_type_0_type.py | 8 + ...dules_item_value_type_2_iterator_type_1.py | 68 + ..._item_value_type_2_iterator_type_1_type.py | 8 + ...ow_value_modules_item_value_type_2_type.py | 8 + ...en_flow_value_modules_item_value_type_3.py | 69 + ...ow_value_modules_item_value_type_3_type.py | 8 + .../windmill_api/models/open_flow_w_path.py | 99 + .../models/open_flow_w_path_schema.py | 44 + .../models/open_flow_w_path_value.py | 95 + .../open_flow_w_path_value_failure_module.py | 230 ++ ...h_value_failure_module_input_transforms.py | 107 + ...t_transforms_additional_property_type_0.py | 71 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 68 + ...nsforms_additional_property_type_1_type.py | 8 + ..._flow_w_path_value_failure_module_retry.py | 84 + ...ath_value_failure_module_retry_constant.py | 65 + ..._value_failure_module_retry_exponential.py | 73 + ..._path_value_failure_module_sleep_type_0.py | 71 + ..._value_failure_module_sleep_type_0_type.py | 8 + ..._path_value_failure_module_sleep_type_1.py | 68 + ..._value_failure_module_sleep_type_1_type.py | 8 + ...path_value_failure_module_stop_after_if.py | 67 + ..._path_value_failure_module_value_type_0.py | 85 + ...ue_failure_module_value_type_0_language.py | 10 + ..._path_value_failure_module_value_type_1.py | 68 + ..._value_failure_module_value_type_1_type.py | 8 + ..._path_value_failure_module_value_type_2.py | 111 + ...ure_module_value_type_2_iterator_type_0.py | 71 + ...odule_value_type_2_iterator_type_0_type.py | 8 + ...ure_module_value_type_2_iterator_type_1.py | 68 + ...odule_value_type_2_iterator_type_1_type.py | 8 + ..._value_failure_module_value_type_2_type.py | 8 + ..._path_value_failure_module_value_type_3.py | 71 + ..._value_failure_module_value_type_3_type.py | 8 + .../open_flow_w_path_value_modules_item.py | 228 ++ ...ath_value_modules_item_input_transforms.py | 107 + ...t_transforms_additional_property_type_0.py | 71 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 68 + ...nsforms_additional_property_type_1_type.py | 8 + ...en_flow_w_path_value_modules_item_retry.py | 82 + ..._path_value_modules_item_retry_constant.py | 65 + ...th_value_modules_item_retry_exponential.py | 73 + ..._w_path_value_modules_item_sleep_type_0.py | 69 + ...th_value_modules_item_sleep_type_0_type.py | 8 + ..._w_path_value_modules_item_sleep_type_1.py | 66 + ...th_value_modules_item_sleep_type_1_type.py | 8 + ...w_path_value_modules_item_stop_after_if.py | 67 + ..._w_path_value_modules_item_value_type_0.py | 85 + ...alue_modules_item_value_type_0_language.py | 10 + ..._w_path_value_modules_item_value_type_1.py | 66 + ...th_value_modules_item_value_type_1_type.py | 8 + ..._w_path_value_modules_item_value_type_2.py | 108 + ...dules_item_value_type_2_iterator_type_0.py | 71 + ..._item_value_type_2_iterator_type_0_type.py | 8 + ...dules_item_value_type_2_iterator_type_1.py | 68 + ..._item_value_type_2_iterator_type_1_type.py | 8 + ...th_value_modules_item_value_type_2_type.py | 8 + ..._w_path_value_modules_item_value_type_3.py | 69 + ...th_value_modules_item_value_type_3_type.py | 8 + .../windmill_api/models/path_flow.py | 69 + .../windmill_api/models/path_flow_type.py | 8 + .../windmill_api/models/path_script.py | 66 + .../windmill_api/models/path_script_type.py | 8 + .../windmill_api/models/preview.py | 85 + .../windmill_api/models/preview_args.py | 44 + .../windmill_api/models/preview_language.py | 10 + .../models/preview_schedule_json_body.py | 67 + .../python_to_jsonschema_response_200.py | 85 + ...on_to_jsonschema_response_200_args_item.py | 167 ++ ...chema_response_200_args_item_typ_type_0.py | 16 + ...chema_response_200_args_item_typ_type_1.py | 57 + ...chema_response_200_args_item_typ_type_2.py | 60 + ...chema_response_200_args_item_typ_type_3.py | 70 + ...se_200_args_item_typ_type_3_object_item.py | 100 + ..._item_typ_type_3_object_item_typ_type_0.py | 16 + ..._item_typ_type_3_object_item_typ_type_1.py | 57 + ...chema_response_200_args_item_typ_type_4.py | 101 + ...se_200_args_item_typ_type_4_list_type_0.py | 16 + ...se_200_args_item_typ_type_4_list_type_1.py | 57 + .../windmill_api/models/queued_job.py | 310 +++ .../windmill_api/models/queued_job_args.py | 44 + .../models/queued_job_flow_status.py | 102 + .../queued_job_flow_status_failure_module.py | 104 + ...job_flow_status_failure_module_iterator.py | 76 + ...ued_job_flow_status_failure_module_type.py | 13 + .../queued_job_flow_status_modules_item.py | 104 + ...d_job_flow_status_modules_item_iterator.py | 76 + ...ueued_job_flow_status_modules_item_type.py | 13 + .../models/queued_job_flow_status_retry.py | 57 + .../models/queued_job_job_kind.py | 13 + .../models/queued_job_language.py | 10 + .../models/queued_job_raw_flow.py | 95 + .../queued_job_raw_flow_failure_module.py | 228 ++ ...aw_flow_failure_module_input_transforms.py | 107 + ...t_transforms_additional_property_type_0.py | 71 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 68 + ...nsforms_additional_property_type_1_type.py | 8 + ...ueued_job_raw_flow_failure_module_retry.py | 82 + ..._raw_flow_failure_module_retry_constant.py | 65 + ...w_flow_failure_module_retry_exponential.py | 73 + ...ob_raw_flow_failure_module_sleep_type_0.py | 69 + ...w_flow_failure_module_sleep_type_0_type.py | 8 + ...ob_raw_flow_failure_module_sleep_type_1.py | 66 + ...w_flow_failure_module_sleep_type_1_type.py | 8 + ...b_raw_flow_failure_module_stop_after_if.py | 67 + ...ob_raw_flow_failure_module_value_type_0.py | 85 + ...ow_failure_module_value_type_0_language.py | 10 + ...ob_raw_flow_failure_module_value_type_1.py | 66 + ...w_flow_failure_module_value_type_1_type.py | 8 + ...ob_raw_flow_failure_module_value_type_2.py | 108 + ...ure_module_value_type_2_iterator_type_0.py | 71 + ...odule_value_type_2_iterator_type_0_type.py | 8 + ...ure_module_value_type_2_iterator_type_1.py | 68 + ...odule_value_type_2_iterator_type_1_type.py | 8 + ...w_flow_failure_module_value_type_2_type.py | 8 + ...ob_raw_flow_failure_module_value_type_3.py | 69 + ...w_flow_failure_module_value_type_3_type.py | 8 + .../queued_job_raw_flow_modules_item.py | 228 ++ ..._raw_flow_modules_item_input_transforms.py | 107 + ...t_transforms_additional_property_type_0.py | 71 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 68 + ...nsforms_additional_property_type_1_type.py | 8 + .../queued_job_raw_flow_modules_item_retry.py | 82 + ...ob_raw_flow_modules_item_retry_constant.py | 65 + ...raw_flow_modules_item_retry_exponential.py | 73 + ..._job_raw_flow_modules_item_sleep_type_0.py | 69 + ...raw_flow_modules_item_sleep_type_0_type.py | 8 + ..._job_raw_flow_modules_item_sleep_type_1.py | 66 + ...raw_flow_modules_item_sleep_type_1_type.py | 8 + ...job_raw_flow_modules_item_stop_after_if.py | 67 + ..._job_raw_flow_modules_item_value_type_0.py | 85 + ...flow_modules_item_value_type_0_language.py | 10 + ..._job_raw_flow_modules_item_value_type_1.py | 66 + ...raw_flow_modules_item_value_type_1_type.py | 8 + ..._job_raw_flow_modules_item_value_type_2.py | 108 + ...dules_item_value_type_2_iterator_type_0.py | 71 + ..._item_value_type_2_iterator_type_0_type.py | 8 + ...dules_item_value_type_2_iterator_type_1.py | 68 + ..._item_value_type_2_iterator_type_1_type.py | 8 + ...raw_flow_modules_item_value_type_2_type.py | 8 + ..._job_raw_flow_modules_item_value_type_3.py | 69 + ...raw_flow_modules_item_value_type_3_type.py | 8 + .../windmill_api/models/raw_script.py | 83 + .../models/raw_script_language.py | 10 + .../models/refresh_token_json_body.py | 57 + .../models/remove_granular_acls_json_body.py | 57 + .../models/remove_granular_acls_kind.py | 13 + .../models/remove_user_to_group_json_body.py | 57 + .../windmill_api/models/resource.py | 122 + .../models/resource_extra_perms.py | 44 + .../windmill_api/models/resource_type.py | 83 + .../windmill_api/models/resource_value.py | 44 + .../models/resume_suspended_job_json_body.py | 44 + .../models/resume_suspended_job_payload.py | 44 + .../windmill-api/windmill_api/models/retry.py | 82 + .../windmill_api/models/retry_constant.py | 65 + .../windmill_api/models/retry_exponential.py | 73 + .../models/run_flow_by_path_json_body.py | 44 + .../models/run_flow_preview_json_body.py | 78 + .../models/run_flow_preview_json_body_args.py | 44 + .../run_flow_preview_json_body_value.py | 95 + ..._preview_json_body_value_failure_module.py | 252 ++ ...y_value_failure_module_input_transforms.py | 107 + ...t_transforms_additional_property_type_0.py | 73 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 70 + ...nsforms_additional_property_type_1_type.py | 8 + ...ew_json_body_value_failure_module_retry.py | 86 + ...ody_value_failure_module_retry_constant.py | 65 + ..._value_failure_module_retry_exponential.py | 73 + ..._body_value_failure_module_sleep_type_0.py | 71 + ..._value_failure_module_sleep_type_0_type.py | 8 + ..._body_value_failure_module_sleep_type_1.py | 68 + ..._value_failure_module_sleep_type_1_type.py | 8 + ...body_value_failure_module_stop_after_if.py | 67 + ..._body_value_failure_module_value_type_0.py | 85 + ...ue_failure_module_value_type_0_language.py | 10 + ..._body_value_failure_module_value_type_1.py | 68 + ..._value_failure_module_value_type_1_type.py | 8 + ..._body_value_failure_module_value_type_2.py | 112 + ...ure_module_value_type_2_iterator_type_0.py | 71 + ...odule_value_type_2_iterator_type_0_type.py | 8 + ...ure_module_value_type_2_iterator_type_1.py | 68 + ...odule_value_type_2_iterator_type_1_type.py | 8 + ..._value_failure_module_value_type_2_type.py | 8 + ..._body_value_failure_module_value_type_3.py | 71 + ..._value_failure_module_value_type_3_type.py | 8 + ...ow_preview_json_body_value_modules_item.py | 249 ++ ...ody_value_modules_item_input_transforms.py | 107 + ...t_transforms_additional_property_type_0.py | 73 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 70 + ...nsforms_additional_property_type_1_type.py | 8 + ...view_json_body_value_modules_item_retry.py | 86 + ..._body_value_modules_item_retry_constant.py | 65 + ...dy_value_modules_item_retry_exponential.py | 73 + ...on_body_value_modules_item_sleep_type_0.py | 71 + ...dy_value_modules_item_sleep_type_0_type.py | 8 + ...on_body_value_modules_item_sleep_type_1.py | 68 + ...dy_value_modules_item_sleep_type_1_type.py | 8 + ...n_body_value_modules_item_stop_after_if.py | 67 + ...on_body_value_modules_item_value_type_0.py | 85 + ...alue_modules_item_value_type_0_language.py | 10 + ...on_body_value_modules_item_value_type_1.py | 68 + ...dy_value_modules_item_value_type_1_type.py | 8 + ...on_body_value_modules_item_value_type_2.py | 112 + ...dules_item_value_type_2_iterator_type_0.py | 71 + ..._item_value_type_2_iterator_type_0_type.py | 8 + ...dules_item_value_type_2_iterator_type_1.py | 68 + ..._item_value_type_2_iterator_type_1_type.py | 8 + ...dy_value_modules_item_value_type_2_type.py | 8 + ...on_body_value_modules_item_value_type_3.py | 71 + ...dy_value_modules_item_value_type_3_type.py | 8 + .../models/run_script_by_hash_json_body.py | 44 + .../models/run_script_by_path_json_body.py | 44 + .../models/run_script_preview_json_body.py | 85 + .../run_script_preview_json_body_args.py | 44 + .../run_script_preview_json_body_language.py | 10 + ...un_wait_result_script_by_path_json_body.py | 44 + .../windmill_api/models/schedule.py | 136 + .../windmill_api/models/schedule_args.py | 44 + .../models/schedule_extra_perms.py | 44 + .../windmill_api/models/script.py | 206 ++ .../windmill_api/models/script_args.py | 44 + .../windmill_api/models/script_extra_perms.py | 44 + .../windmill_api/models/script_kind.py | 11 + .../windmill_api/models/script_language.py | 10 + .../windmill_api/models/script_schema.py | 44 + .../models/set_password_json_body.py | 57 + .../models/set_schedule_enabled_json_body.py | 57 + .../models/set_workspace_slack_json_body.py | 80 + .../set_workspace_slack_json_body_bot.py | 57 + .../windmill_api/models/slack_token.py | 80 + .../windmill_api/models/slack_token_bot.py | 57 + .../windmill_api/models/static_transform.py | 69 + .../models/static_transform_type.py | 8 + .../windmill_api/models/token_response.py | 85 + .../windmill_api/models/truncated_token.py | 100 + .../models/update_flow_json_body.py | 99 + .../models/update_flow_json_body_schema.py | 44 + .../models/update_flow_json_body_value.py | 95 + ...ate_flow_json_body_value_failure_module.py | 249 ++ ...y_value_failure_module_input_transforms.py | 107 + ...t_transforms_additional_property_type_0.py | 71 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 68 + ...nsforms_additional_property_type_1_type.py | 8 + ...ow_json_body_value_failure_module_retry.py | 86 + ...ody_value_failure_module_retry_constant.py | 65 + ..._value_failure_module_retry_exponential.py | 73 + ..._body_value_failure_module_sleep_type_0.py | 71 + ..._value_failure_module_sleep_type_0_type.py | 8 + ..._body_value_failure_module_sleep_type_1.py | 68 + ..._value_failure_module_sleep_type_1_type.py | 8 + ...body_value_failure_module_stop_after_if.py | 67 + ..._body_value_failure_module_value_type_0.py | 85 + ...ue_failure_module_value_type_0_language.py | 10 + ..._body_value_failure_module_value_type_1.py | 68 + ..._value_failure_module_value_type_1_type.py | 8 + ..._body_value_failure_module_value_type_2.py | 112 + ...ure_module_value_type_2_iterator_type_0.py | 71 + ...odule_value_type_2_iterator_type_0_type.py | 8 + ...ure_module_value_type_2_iterator_type_1.py | 68 + ...odule_value_type_2_iterator_type_1_type.py | 8 + ..._value_failure_module_value_type_2_type.py | 8 + ..._body_value_failure_module_value_type_3.py | 71 + ..._value_failure_module_value_type_3_type.py | 8 + ...pdate_flow_json_body_value_modules_item.py | 235 ++ ...ody_value_modules_item_input_transforms.py | 107 + ...t_transforms_additional_property_type_0.py | 71 + ...nsforms_additional_property_type_0_type.py | 8 + ...t_transforms_additional_property_type_1.py | 68 + ...nsforms_additional_property_type_1_type.py | 8 + ...flow_json_body_value_modules_item_retry.py | 86 + ..._body_value_modules_item_retry_constant.py | 65 + ...dy_value_modules_item_retry_exponential.py | 73 + ...on_body_value_modules_item_sleep_type_0.py | 71 + ...dy_value_modules_item_sleep_type_0_type.py | 8 + ...on_body_value_modules_item_sleep_type_1.py | 68 + ...dy_value_modules_item_sleep_type_1_type.py | 8 + ...n_body_value_modules_item_stop_after_if.py | 67 + ...on_body_value_modules_item_value_type_0.py | 85 + ...alue_modules_item_value_type_0_language.py | 10 + ...on_body_value_modules_item_value_type_1.py | 68 + ...dy_value_modules_item_value_type_1_type.py | 8 + ...on_body_value_modules_item_value_type_2.py | 112 + ...dules_item_value_type_2_iterator_type_0.py | 71 + ..._item_value_type_2_iterator_type_0_type.py | 8 + ...dules_item_value_type_2_iterator_type_1.py | 68 + ..._item_value_type_2_iterator_type_1_type.py | 8 + ...dy_value_modules_item_value_type_2_type.py | 8 + ...on_body_value_modules_item_value_type_3.py | 71 + ...dy_value_modules_item_value_type_3_type.py | 8 + .../models/update_group_json_body.py | 57 + .../models/update_resource_json_body.py | 81 + .../models/update_resource_json_body_value.py | 44 + .../models/update_resource_type_json_body.py | 65 + .../models/update_schedule_json_body.py | 80 + .../models/update_schedule_json_body_args.py | 44 + .../models/update_user_json_body.py | 57 + .../models/update_variable_json_body.py | 81 + .../windmill-api/windmill_api/models/usage.py | 73 + .../windmill-api/windmill_api/models/user.py | 131 + .../windmill_api/models/user_usage.py | 73 + .../models/user_workspace_list.py | 75 + .../user_workspace_list_workspaces_item.py | 71 + .../models/whoami_response_200.py | 131 + .../models/whoami_response_200_usage.py | 73 + .../windmill_api/models/whois_response_200.py | 131 + .../models/whois_response_200_usage.py | 73 + .../windmill_api/models/worker_ping.py | 96 + .../windmill_api/models/workspace.py | 81 + .../windmill_api/models/workspace_invite.py | 71 + .../windmill-api/windmill_api/py.typed | 1 + .../windmill-api/windmill_api/types.py | 43 + 1430 files changed, 95542 insertions(+), 14 deletions(-) create mode 100644 frontend/CaddyfileLsp create mode 100644 python-client/windmill-api/.gitignore create mode 100644 python-client/windmill-api/LICENSE create mode 100644 python-client/windmill-api/README.md create mode 100644 python-client/windmill-api/pyproject.toml create mode 100644 python-client/windmill-api/windmill_api/__init__.py create mode 100644 python-client/windmill-api/windmill_api/api/__init__.py create mode 100644 python-client/windmill-api/windmill_api/api/audit/__init__.py create mode 100644 python-client/windmill-api/windmill_api/api/audit/get_audit_log.py create mode 100644 python-client/windmill-api/windmill_api/api/audit/list_audit_logs.py create mode 100644 python-client/windmill-api/windmill_api/api/flow/__init__.py create mode 100644 python-client/windmill-api/windmill_api/api/flow/archive_flow_by_path.py create mode 100644 python-client/windmill-api/windmill_api/api/flow/create_flow.py create mode 100644 python-client/windmill-api/windmill_api/api/flow/exists_flow_by_path.py create mode 100644 python-client/windmill-api/windmill_api/api/flow/get_flow_by_path.py create mode 100644 python-client/windmill-api/windmill_api/api/flow/get_hub_flow_by_id.py create mode 100644 python-client/windmill-api/windmill_api/api/flow/list_flows.py create mode 100644 python-client/windmill-api/windmill_api/api/flow/list_hub_flows.py create mode 100644 python-client/windmill-api/windmill_api/api/flow/update_flow.py create mode 100644 python-client/windmill-api/windmill_api/api/granular_acl/__init__.py create mode 100644 python-client/windmill-api/windmill_api/api/granular_acl/add_granular_acls.py create mode 100644 python-client/windmill-api/windmill_api/api/granular_acl/get_granular_acls.py create mode 100644 python-client/windmill-api/windmill_api/api/granular_acl/remove_granular_acls.py create mode 100644 python-client/windmill-api/windmill_api/api/group/__init__.py create mode 100644 python-client/windmill-api/windmill_api/api/group/add_user_to_group.py create mode 100644 python-client/windmill-api/windmill_api/api/group/create_group.py create mode 100644 python-client/windmill-api/windmill_api/api/group/delete_group.py create mode 100644 python-client/windmill-api/windmill_api/api/group/get_group.py create mode 100644 python-client/windmill-api/windmill_api/api/group/list_group_names.py create mode 100644 python-client/windmill-api/windmill_api/api/group/list_groups.py create mode 100644 python-client/windmill-api/windmill_api/api/group/remove_user_to_group.py create mode 100644 python-client/windmill-api/windmill_api/api/group/update_group.py create mode 100644 python-client/windmill-api/windmill_api/api/job/__init__.py create mode 100644 python-client/windmill-api/windmill_api/api/job/cancel_queued_job.py create mode 100644 python-client/windmill-api/windmill_api/api/job/cancel_suspended_job.py create mode 100644 python-client/windmill-api/windmill_api/api/job/delete_completed_job.py create mode 100644 python-client/windmill-api/windmill_api/api/job/get_completed_job.py create mode 100644 python-client/windmill-api/windmill_api/api/job/get_job.py create mode 100644 python-client/windmill-api/windmill_api/api/job/get_job_updates.py create mode 100644 python-client/windmill-api/windmill_api/api/job/list_completed_jobs.py create mode 100644 python-client/windmill-api/windmill_api/api/job/list_jobs.py create mode 100644 python-client/windmill-api/windmill_api/api/job/list_queue.py create mode 100644 python-client/windmill-api/windmill_api/api/job/resume_suspended_job.py create mode 100644 python-client/windmill-api/windmill_api/api/job/run_flow_by_path.py create mode 100644 python-client/windmill-api/windmill_api/api/job/run_flow_preview.py create mode 100644 python-client/windmill-api/windmill_api/api/job/run_script_by_hash.py create mode 100644 python-client/windmill-api/windmill_api/api/job/run_script_by_path.py create mode 100644 python-client/windmill-api/windmill_api/api/job/run_script_preview.py create mode 100644 python-client/windmill-api/windmill_api/api/job/run_wait_result_script_by_path.py create mode 100644 python-client/windmill-api/windmill_api/api/oauth/__init__.py create mode 100644 python-client/windmill-api/windmill_api/api/oauth/connect_callback.py create mode 100644 python-client/windmill-api/windmill_api/api/oauth/connect_slack_callback.py create mode 100644 python-client/windmill-api/windmill_api/api/oauth/create_account.py create mode 100644 python-client/windmill-api/windmill_api/api/oauth/disconnect_account.py create mode 100644 python-client/windmill-api/windmill_api/api/oauth/disconnect_slack.py create mode 100644 python-client/windmill-api/windmill_api/api/oauth/list_o_auth_connects.py create mode 100644 python-client/windmill-api/windmill_api/api/oauth/list_o_auth_logins.py create mode 100644 python-client/windmill-api/windmill_api/api/oauth/refresh_token.py create mode 100644 python-client/windmill-api/windmill_api/api/oauth/set_workspace_slack.py create mode 100644 python-client/windmill-api/windmill_api/api/resource/__init__.py create mode 100644 python-client/windmill-api/windmill_api/api/resource/create_resource.py create mode 100644 python-client/windmill-api/windmill_api/api/resource/create_resource_type.py create mode 100644 python-client/windmill-api/windmill_api/api/resource/delete_resource.py create mode 100644 python-client/windmill-api/windmill_api/api/resource/delete_resource_type.py create mode 100644 python-client/windmill-api/windmill_api/api/resource/exists_resource.py create mode 100644 python-client/windmill-api/windmill_api/api/resource/exists_resource_type.py create mode 100644 python-client/windmill-api/windmill_api/api/resource/get_resource.py create mode 100644 python-client/windmill-api/windmill_api/api/resource/get_resource_type.py create mode 100644 python-client/windmill-api/windmill_api/api/resource/list_resource.py create mode 100644 python-client/windmill-api/windmill_api/api/resource/list_resource_type.py create mode 100644 python-client/windmill-api/windmill_api/api/resource/list_resource_type_names.py create mode 100644 python-client/windmill-api/windmill_api/api/resource/update_resource.py create mode 100644 python-client/windmill-api/windmill_api/api/resource/update_resource_type.py create mode 100644 python-client/windmill-api/windmill_api/api/schedule/__init__.py create mode 100644 python-client/windmill-api/windmill_api/api/schedule/create_schedule.py create mode 100644 python-client/windmill-api/windmill_api/api/schedule/delete_schedule.py create mode 100644 python-client/windmill-api/windmill_api/api/schedule/exists_schedule.py create mode 100644 python-client/windmill-api/windmill_api/api/schedule/get_schedule.py create mode 100644 python-client/windmill-api/windmill_api/api/schedule/list_schedules.py create mode 100644 python-client/windmill-api/windmill_api/api/schedule/preview_schedule.py create mode 100644 python-client/windmill-api/windmill_api/api/schedule/set_schedule_enabled.py create mode 100644 python-client/windmill-api/windmill_api/api/schedule/update_schedule.py create mode 100644 python-client/windmill-api/windmill_api/api/script/__init__.py create mode 100644 python-client/windmill-api/windmill_api/api/script/archive_script_by_hash.py create mode 100644 python-client/windmill-api/windmill_api/api/script/archive_script_by_path.py create mode 100644 python-client/windmill-api/windmill_api/api/script/create_script.py create mode 100644 python-client/windmill-api/windmill_api/api/script/delete_script_by_hash.py create mode 100644 python-client/windmill-api/windmill_api/api/script/deno_to_jsonschema.py create mode 100644 python-client/windmill-api/windmill_api/api/script/exists_script_by_path.py create mode 100644 python-client/windmill-api/windmill_api/api/script/get_hub_script_content_by_path.py create mode 100644 python-client/windmill-api/windmill_api/api/script/get_script_by_hash.py create mode 100644 python-client/windmill-api/windmill_api/api/script/get_script_by_path.py create mode 100644 python-client/windmill-api/windmill_api/api/script/get_script_deployment_status.py create mode 100644 python-client/windmill-api/windmill_api/api/script/go_to_jsonschema.py create mode 100644 python-client/windmill-api/windmill_api/api/script/list_hub_scripts.py create mode 100644 python-client/windmill-api/windmill_api/api/script/list_scripts.py create mode 100644 python-client/windmill-api/windmill_api/api/script/python_to_jsonschema.py create mode 100644 python-client/windmill-api/windmill_api/api/script/raw_script_by_hash.py create mode 100644 python-client/windmill-api/windmill_api/api/script/raw_script_by_path.py create mode 100644 python-client/windmill-api/windmill_api/api/settings/__init__.py create mode 100644 python-client/windmill-api/windmill_api/api/settings/backend_version.py create mode 100644 python-client/windmill-api/windmill_api/api/settings/get_open_api_yaml.py create mode 100644 python-client/windmill-api/windmill_api/api/user/__init__.py create mode 100644 python-client/windmill-api/windmill_api/api/user/accept_invite.py create mode 100644 python-client/windmill-api/windmill_api/api/user/create_token.py create mode 100644 python-client/windmill-api/windmill_api/api/user/create_user.py create mode 100644 python-client/windmill-api/windmill_api/api/user/create_user_globally.py create mode 100644 python-client/windmill-api/windmill_api/api/user/decline_invite.py create mode 100644 python-client/windmill-api/windmill_api/api/user/delete_token.py create mode 100644 python-client/windmill-api/windmill_api/api/user/delete_user.py create mode 100644 python-client/windmill-api/windmill_api/api/user/get_current_email.py create mode 100644 python-client/windmill-api/windmill_api/api/user/global_user_update.py create mode 100644 python-client/windmill-api/windmill_api/api/user/global_whoami.py create mode 100644 python-client/windmill-api/windmill_api/api/user/leave_workspace.py create mode 100644 python-client/windmill-api/windmill_api/api/user/list_tokens.py create mode 100644 python-client/windmill-api/windmill_api/api/user/list_usernames.py create mode 100644 python-client/windmill-api/windmill_api/api/user/list_users.py create mode 100644 python-client/windmill-api/windmill_api/api/user/list_users_as_super_admin.py create mode 100644 python-client/windmill-api/windmill_api/api/user/list_workspace_invites.py create mode 100644 python-client/windmill-api/windmill_api/api/user/login.py create mode 100644 python-client/windmill-api/windmill_api/api/user/login_with_oauth.py create mode 100644 python-client/windmill-api/windmill_api/api/user/logout.py create mode 100644 python-client/windmill-api/windmill_api/api/user/set_password.py create mode 100644 python-client/windmill-api/windmill_api/api/user/update_user.py create mode 100644 python-client/windmill-api/windmill_api/api/user/whoami.py create mode 100644 python-client/windmill-api/windmill_api/api/user/whois.py create mode 100644 python-client/windmill-api/windmill_api/api/variable/__init__.py create mode 100644 python-client/windmill-api/windmill_api/api/variable/create_variable.py create mode 100644 python-client/windmill-api/windmill_api/api/variable/delete_variable.py create mode 100644 python-client/windmill-api/windmill_api/api/variable/exists_variable.py create mode 100644 python-client/windmill-api/windmill_api/api/variable/get_variable.py create mode 100644 python-client/windmill-api/windmill_api/api/variable/list_contextual_variables.py create mode 100644 python-client/windmill-api/windmill_api/api/variable/list_variable.py create mode 100644 python-client/windmill-api/windmill_api/api/variable/update_variable.py create mode 100644 python-client/windmill-api/windmill_api/api/worker/__init__.py create mode 100644 python-client/windmill-api/windmill_api/api/worker/list_workers.py create mode 100644 python-client/windmill-api/windmill_api/api/workspace/__init__.py create mode 100644 python-client/windmill-api/windmill_api/api/workspace/create_workspace.py create mode 100644 python-client/windmill-api/windmill_api/api/workspace/delete_invite.py create mode 100644 python-client/windmill-api/windmill_api/api/workspace/delete_workspace.py create mode 100644 python-client/windmill-api/windmill_api/api/workspace/edit_slack_command.py create mode 100644 python-client/windmill-api/windmill_api/api/workspace/exists_username.py create mode 100644 python-client/windmill-api/windmill_api/api/workspace/exists_workspace.py create mode 100644 python-client/windmill-api/windmill_api/api/workspace/get_settings.py create mode 100644 python-client/windmill-api/windmill_api/api/workspace/invite_user.py create mode 100644 python-client/windmill-api/windmill_api/api/workspace/list_pending_invites.py create mode 100644 python-client/windmill-api/windmill_api/api/workspace/list_user_workspaces.py create mode 100644 python-client/windmill-api/windmill_api/api/workspace/list_workspaces.py create mode 100644 python-client/windmill-api/windmill_api/api/workspace/list_workspaces_as_super_admin.py create mode 100644 python-client/windmill-api/windmill_api/client.py create mode 100644 python-client/windmill-api/windmill_api/models/__init__.py create mode 100644 python-client/windmill-api/windmill_api/models/accept_invite_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/add_granular_acls_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/add_granular_acls_kind.py create mode 100644 python-client/windmill-api/windmill_api/models/add_user_to_group_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/archive_script_by_hash_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/archive_script_by_hash_response_200_extra_perms.py create mode 100644 python-client/windmill-api/windmill_api/models/archive_script_by_hash_response_200_kind.py create mode 100644 python-client/windmill-api/windmill_api/models/archive_script_by_hash_response_200_language.py create mode 100644 python-client/windmill-api/windmill_api/models/archive_script_by_hash_response_200_schema.py create mode 100644 python-client/windmill-api/windmill_api/models/audit_log.py create mode 100644 python-client/windmill-api/windmill_api/models/audit_log_action_kind.py create mode 100644 python-client/windmill-api/windmill_api/models/audit_log_operation.py create mode 100644 python-client/windmill-api/windmill_api/models/audit_log_parameters.py create mode 100644 python-client/windmill-api/windmill_api/models/cancel_queued_job_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/cancel_suspended_job_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/cancel_suspended_job_payload.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_args.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_flow_status.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_flow_status_failure_module.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_flow_status_failure_module_iterator.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_flow_status_failure_module_type.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_flow_status_modules_item.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_flow_status_modules_item_iterator.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_flow_status_modules_item_type.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_flow_status_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_job_kind.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_language.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/completed_job_result.py create mode 100644 python-client/windmill-api/windmill_api/models/connect_callback_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/connect_callback_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/connect_slack_callback_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/connect_slack_callback_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/connect_slack_callback_response_200_bot.py create mode 100644 python-client/windmill-api/windmill_api/models/contextual_variable.py create mode 100644 python-client/windmill-api/windmill_api/models/create_account_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_schema.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/create_group_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/create_resource.py create mode 100644 python-client/windmill-api/windmill_api/models/create_resource_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/create_resource_json_body_value.py create mode 100644 python-client/windmill-api/windmill_api/models/create_resource_type_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/create_resource_value.py create mode 100644 python-client/windmill-api/windmill_api/models/create_schedule_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/create_schedule_json_body_args.py create mode 100644 python-client/windmill-api/windmill_api/models/create_script_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/create_script_json_body_kind.py create mode 100644 python-client/windmill-api/windmill_api/models/create_script_json_body_language.py create mode 100644 python-client/windmill-api/windmill_api/models/create_script_json_body_schema.py create mode 100644 python-client/windmill-api/windmill_api/models/create_token_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/create_user_globally_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/create_user_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/create_variable.py create mode 100644 python-client/windmill-api/windmill_api/models/create_variable_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/create_workspace.py create mode 100644 python-client/windmill-api/windmill_api/models/create_workspace_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/decline_invite_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_args.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_failure_module.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_failure_module_iterator.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_failure_module_type.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_modules_item.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_modules_item_iterator.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_modules_item_type.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_job_kind.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_language.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_result.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_invite_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_script_by_hash_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_script_by_hash_response_200_extra_perms.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_script_by_hash_response_200_kind.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_script_by_hash_response_200_language.py create mode 100644 python-client/windmill-api/windmill_api/models/delete_script_by_hash_response_200_schema.py create mode 100644 python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item.py create mode 100644 python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_3_object_item.py create mode 100644 python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_4.py create mode 100644 python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_4_list_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_4_list_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/edit_resource.py create mode 100644 python-client/windmill-api/windmill_api/models/edit_resource_type.py create mode 100644 python-client/windmill-api/windmill_api/models/edit_resource_value.py create mode 100644 python-client/windmill-api/windmill_api/models/edit_schedule.py create mode 100644 python-client/windmill-api/windmill_api/models/edit_schedule_args.py create mode 100644 python-client/windmill-api/windmill_api/models/edit_slack_command_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/edit_variable.py create mode 100644 python-client/windmill-api/windmill_api/models/edit_workspace_user.py create mode 100644 python-client/windmill-api/windmill_api/models/exists_username_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/exists_workspace_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/flow.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_extra_perms.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_metadata.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_metadata_extra_perms.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_module_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_args.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_schema.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_status.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_status_failure_module.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_status_failure_module_iterator.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_status_failure_module_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_status_module.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_status_module_iterator.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_status_module_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_status_modules_item.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_status_modules_item_iterator.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_status_modules_item_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_status_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/forloop_flow.py create mode 100644 python-client/windmill-api/windmill_api/models/forloop_flow_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/forloop_flow_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/forloop_flow_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/forloop_flow_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/forloop_flow_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_audit_log_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/get_audit_log_response_200_action_kind.py create mode 100644 python-client/windmill-api/windmill_api/models/get_audit_log_response_200_operation.py create mode 100644 python-client/windmill-api/windmill_api/models/get_audit_log_response_200_parameters.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_args.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_failure_module.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_failure_module_iterator.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_failure_module_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_modules_item.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_modules_item_iterator.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_modules_item_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_job_kind.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_language.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_completed_job_response_200_result.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_extra_perms.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_schema.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_granular_acls_kind.py create mode 100644 python-client/windmill-api/windmill_api/models/get_granular_acls_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/get_group_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/get_group_response_200_extra_perms.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_schema.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_job_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/get_job_response_200_type.py create mode 100644 python-client/windmill-api/windmill_api/models/get_job_updates_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/get_resource_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/get_resource_response_200_extra_perms.py create mode 100644 python-client/windmill-api/windmill_api/models/get_resource_response_200_value.py create mode 100644 python-client/windmill-api/windmill_api/models/get_resource_type_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/get_schedule_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/get_schedule_response_200_args.py create mode 100644 python-client/windmill-api/windmill_api/models/get_schedule_response_200_extra_perms.py create mode 100644 python-client/windmill-api/windmill_api/models/get_script_by_hash_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/get_script_by_hash_response_200_extra_perms.py create mode 100644 python-client/windmill-api/windmill_api/models/get_script_by_hash_response_200_kind.py create mode 100644 python-client/windmill-api/windmill_api/models/get_script_by_hash_response_200_language.py create mode 100644 python-client/windmill-api/windmill_api/models/get_script_by_hash_response_200_schema.py create mode 100644 python-client/windmill-api/windmill_api/models/get_script_by_path_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/get_script_by_path_response_200_extra_perms.py create mode 100644 python-client/windmill-api/windmill_api/models/get_script_by_path_response_200_kind.py create mode 100644 python-client/windmill-api/windmill_api/models/get_script_by_path_response_200_language.py create mode 100644 python-client/windmill-api/windmill_api/models/get_script_by_path_response_200_schema.py create mode 100644 python-client/windmill-api/windmill_api/models/get_script_deployment_status_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/get_settings_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/get_variable_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/get_variable_response_200_extra_perms.py create mode 100644 python-client/windmill-api/windmill_api/models/global_user_info.py create mode 100644 python-client/windmill-api/windmill_api/models/global_user_info_login_type.py create mode 100644 python-client/windmill-api/windmill_api/models/global_user_update_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/global_whoami_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/global_whoami_response_200_login_type.py create mode 100644 python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item.py create mode 100644 python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_3_object_item.py create mode 100644 python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_4.py create mode 100644 python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_4_list_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_4_list_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/group.py create mode 100644 python-client/windmill-api/windmill_api/models/group_extra_perms.py create mode 100644 python-client/windmill-api/windmill_api/models/input_transform_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/input_transform_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/input_transform_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/input_transform_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/invite_user_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/javascript_transform.py create mode 100644 python-client/windmill-api/windmill_api/models/javascript_transform_type.py create mode 100644 python-client/windmill-api/windmill_api/models/job.py create mode 100644 python-client/windmill-api/windmill_api/models/job_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_audit_logs_action_kind.py create mode 100644 python-client/windmill-api/windmill_api/models/list_audit_logs_response_200_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_audit_logs_response_200_item_action_kind.py create mode 100644 python-client/windmill-api/windmill_api/models/list_audit_logs_response_200_item_operation.py create mode 100644 python-client/windmill-api/windmill_api/models/list_audit_logs_response_200_item_parameters.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_args.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_failure_module.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_failure_module_iterator.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_failure_module_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_modules_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_modules_item_iterator.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_modules_item_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_job_kind.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_language.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_result.py create mode 100644 python-client/windmill-api/windmill_api/models/list_contextual_variables_response_200_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_extra_perms.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_schema.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_groups_response_200_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_groups_response_200_item_extra_perms.py create mode 100644 python-client/windmill-api/windmill_api/models/list_hub_flows_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/list_hub_flows_response_200_flows_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_hub_scripts_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/list_hub_scripts_response_200_asks_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_hub_scripts_response_200_asks_item_kind.py create mode 100644 python-client/windmill-api/windmill_api/models/list_jobs_response_200_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_jobs_response_200_item_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_pending_invites_response_200_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_args.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_failure_module.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_failure_module_iterator.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_failure_module_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_modules_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_modules_item_iterator.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_modules_item_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_job_kind.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_language.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_resource_response_200_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_resource_response_200_item_extra_perms.py create mode 100644 python-client/windmill-api/windmill_api/models/list_resource_response_200_item_value.py create mode 100644 python-client/windmill-api/windmill_api/models/list_resource_type_response_200_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_schedules_response_200_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_schedules_response_200_item_args.py create mode 100644 python-client/windmill-api/windmill_api/models/list_schedules_response_200_item_extra_perms.py create mode 100644 python-client/windmill-api/windmill_api/models/list_scripts_response_200_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_scripts_response_200_item_extra_perms.py create mode 100644 python-client/windmill-api/windmill_api/models/list_scripts_response_200_item_kind.py create mode 100644 python-client/windmill-api/windmill_api/models/list_scripts_response_200_item_language.py create mode 100644 python-client/windmill-api/windmill_api/models/list_scripts_response_200_item_schema.py create mode 100644 python-client/windmill-api/windmill_api/models/list_tokens_response_200_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_user_workspaces_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/list_user_workspaces_response_200_workspaces_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_users_as_super_admin_response_200_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_users_as_super_admin_response_200_item_login_type.py create mode 100644 python-client/windmill-api/windmill_api/models/list_users_response_200_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_users_response_200_item_usage.py create mode 100644 python-client/windmill-api/windmill_api/models/list_variable_response_200_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_variable_response_200_item_extra_perms.py create mode 100644 python-client/windmill-api/windmill_api/models/list_workers_response_200_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_workspace_invites_response_200_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_workspaces_as_super_admin_response_200_item.py create mode 100644 python-client/windmill-api/windmill_api/models/list_workspaces_response_200_item.py create mode 100644 python-client/windmill-api/windmill_api/models/listable_variable.py create mode 100644 python-client/windmill-api/windmill_api/models/listable_variable_extra_perms.py create mode 100644 python-client/windmill-api/windmill_api/models/login.py create mode 100644 python-client/windmill-api/windmill_api/models/login_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/login_with_oauth_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/main_arg_signature.py create mode 100644 python-client/windmill-api/windmill_api/models/main_arg_signature_args_item.py create mode 100644 python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_3_object_item.py create mode 100644 python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_3_object_item_typ_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_3_object_item_typ_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_4.py create mode 100644 python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_4_list_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_4_list_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/new_schedule.py create mode 100644 python-client/windmill-api/windmill_api/models/new_schedule_args.py create mode 100644 python-client/windmill-api/windmill_api/models/new_token.py create mode 100644 python-client/windmill-api/windmill_api/models/new_user.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_schema.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_schema.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/path_flow.py create mode 100644 python-client/windmill-api/windmill_api/models/path_flow_type.py create mode 100644 python-client/windmill-api/windmill_api/models/path_script.py create mode 100644 python-client/windmill-api/windmill_api/models/path_script_type.py create mode 100644 python-client/windmill-api/windmill_api/models/preview.py create mode 100644 python-client/windmill-api/windmill_api/models/preview_args.py create mode 100644 python-client/windmill-api/windmill_api/models/preview_language.py create mode 100644 python-client/windmill-api/windmill_api/models/preview_schedule_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item.py create mode 100644 python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_3_object_item.py create mode 100644 python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_4.py create mode 100644 python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_4_list_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_4_list_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_args.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_flow_status.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_flow_status_failure_module.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_flow_status_failure_module_iterator.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_flow_status_failure_module_type.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_flow_status_modules_item.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_flow_status_modules_item_iterator.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_flow_status_modules_item_type.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_flow_status_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_job_kind.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_language.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/raw_script.py create mode 100644 python-client/windmill-api/windmill_api/models/raw_script_language.py create mode 100644 python-client/windmill-api/windmill_api/models/refresh_token_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/remove_granular_acls_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/remove_granular_acls_kind.py create mode 100644 python-client/windmill-api/windmill_api/models/remove_user_to_group_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/resource.py create mode 100644 python-client/windmill-api/windmill_api/models/resource_extra_perms.py create mode 100644 python-client/windmill-api/windmill_api/models/resource_type.py create mode 100644 python-client/windmill-api/windmill_api/models/resource_value.py create mode 100644 python-client/windmill-api/windmill_api/models/resume_suspended_job_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/resume_suspended_job_payload.py create mode 100644 python-client/windmill-api/windmill_api/models/retry.py create mode 100644 python-client/windmill-api/windmill_api/models/retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_by_path_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_args.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/run_script_by_hash_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/run_script_by_path_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/run_script_preview_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/run_script_preview_json_body_args.py create mode 100644 python-client/windmill-api/windmill_api/models/run_script_preview_json_body_language.py create mode 100644 python-client/windmill-api/windmill_api/models/run_wait_result_script_by_path_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/schedule.py create mode 100644 python-client/windmill-api/windmill_api/models/schedule_args.py create mode 100644 python-client/windmill-api/windmill_api/models/schedule_extra_perms.py create mode 100644 python-client/windmill-api/windmill_api/models/script.py create mode 100644 python-client/windmill-api/windmill_api/models/script_args.py create mode 100644 python-client/windmill-api/windmill_api/models/script_extra_perms.py create mode 100644 python-client/windmill-api/windmill_api/models/script_kind.py create mode 100644 python-client/windmill-api/windmill_api/models/script_language.py create mode 100644 python-client/windmill-api/windmill_api/models/script_schema.py create mode 100644 python-client/windmill-api/windmill_api/models/set_password_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/set_schedule_enabled_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/set_workspace_slack_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/set_workspace_slack_json_body_bot.py create mode 100644 python-client/windmill-api/windmill_api/models/slack_token.py create mode 100644 python-client/windmill-api/windmill_api/models/slack_token_bot.py create mode 100644 python-client/windmill-api/windmill_api/models/static_transform.py create mode 100644 python-client/windmill-api/windmill_api/models/static_transform_type.py create mode 100644 python-client/windmill-api/windmill_api/models/token_response.py create mode 100644 python-client/windmill-api/windmill_api/models/truncated_token.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_schema.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_input_transforms.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_input_transforms_additional_property_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_input_transforms_additional_property_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_input_transforms_additional_property_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_input_transforms_additional_property_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_retry.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_retry_constant.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_retry_exponential.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_sleep_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_sleep_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_sleep_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_sleep_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_stop_after_if.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_0_language.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2_iterator_type_0.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2_iterator_type_0_type.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2_iterator_type_1.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2_iterator_type_1_type.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2_type.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_3.py create mode 100644 python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_3_type.py create mode 100644 python-client/windmill-api/windmill_api/models/update_group_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/update_resource_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/update_resource_json_body_value.py create mode 100644 python-client/windmill-api/windmill_api/models/update_resource_type_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/update_schedule_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/update_schedule_json_body_args.py create mode 100644 python-client/windmill-api/windmill_api/models/update_user_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/update_variable_json_body.py create mode 100644 python-client/windmill-api/windmill_api/models/usage.py create mode 100644 python-client/windmill-api/windmill_api/models/user.py create mode 100644 python-client/windmill-api/windmill_api/models/user_usage.py create mode 100644 python-client/windmill-api/windmill_api/models/user_workspace_list.py create mode 100644 python-client/windmill-api/windmill_api/models/user_workspace_list_workspaces_item.py create mode 100644 python-client/windmill-api/windmill_api/models/whoami_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/whoami_response_200_usage.py create mode 100644 python-client/windmill-api/windmill_api/models/whois_response_200.py create mode 100644 python-client/windmill-api/windmill_api/models/whois_response_200_usage.py create mode 100644 python-client/windmill-api/windmill_api/models/worker_ping.py create mode 100644 python-client/windmill-api/windmill_api/models/workspace.py create mode 100644 python-client/windmill-api/windmill_api/models/workspace_invite.py create mode 100644 python-client/windmill-api/windmill_api/py.typed create mode 100644 python-client/windmill-api/windmill_api/types.py diff --git a/backend/openapi.yaml b/backend/openapi.yaml index a0faf96052..61d3faf19b 100644 --- a/backend/openapi.yaml +++ b/backend/openapi.yaml @@ -2565,7 +2565,13 @@ paths: schema: type: object responses: - "201" + "201": + description: job resumed + content: + text/plain: + schema: + type: string + post: summary: resume a job for a suspended flow operationId: resumeSuspendedJob @@ -2580,7 +2586,12 @@ paths: schema: type: object responses: - "201" + "201": + description: job resumed + content: + text/plain: + schema: + type: string /w/{workspace}/jobs/cancel/{id}: get: @@ -2596,7 +2607,13 @@ paths: schema: type: object responses: - "201" + "201": + description: job resumed + content: + text/plain: + schema: + type: string + post: summary: cancel a job for a suspended flow operationId: cancelSuspendedJob @@ -2611,7 +2628,13 @@ paths: schema: type: object responses: - "201" + "201": + description: job resumed + content: + text/plain: + schema: + type: string + /schedules/preview: post: diff --git a/backend/src/worker.rs b/backend/src/worker.rs index 84fe440a15..b87db0e393 100644 --- a/backend/src/worker.rs +++ b/backend/src/worker.rs @@ -1378,7 +1378,12 @@ async fn install_go_dependencies( } async fn gen_go_mymod(code: &str, job_dir: &str) -> error::Result<()> { - let code = &format!("package inner; {code}").replace("func main(", "func Inner_main("); + let code = if code.trim_start().starts_with("package") { + code.to_string() + } else { + format!("package inner; {code}") + }; + let code = code.replace("func main(", "func Inner_main("); let mymod_dir = format!("{job_dir}/inner"); DirBuilder::new() diff --git a/frontend/CaddyfileLsp b/frontend/CaddyfileLsp new file mode 100644 index 0000000000..eb86cda7e2 --- /dev/null +++ b/frontend/CaddyfileLsp @@ -0,0 +1,14 @@ +http://localhost { + bind {$ADDRESS} + reverse_proxy /api/* https://app.windmill.dev { + header_up Host {http.reverse_proxy.upstream.hostport} + } + reverse_proxy /* http://localhost:3000 +} + + +https://localhost { + bind {$ADDRESS} + reverse_proxy /ws/* http://localhost:3001 +} + diff --git a/frontend/src/lib/components/Editor.svelte b/frontend/src/lib/components/Editor.svelte index af64618731..7eb1289a73 100644 --- a/frontend/src/lib/components/Editor.svelte +++ b/frontend/src/lib/components/Editor.svelte @@ -58,7 +58,7 @@ export let cmdEnterAction: (() => void) | undefined = undefined export let formatAction: (() => void) | undefined = undefined export let automaticLayout = true - export let websocketAlive = { pyright: false, black: false, deno: false } + export let websocketAlive = { pyright: false, black: false, deno: false, go: false } export let shouldBindKey: boolean = true let websockets: [MonacoLanguageClient, WebSocket][] = [] @@ -68,7 +68,7 @@ let disposeMethod: () => void | undefined const dispatch = createEventDispatcher() - const uri = `file:///${hash}.${langToExt(lang)}` + const uri = `file:///tmp/monaco/${hash}.${langToExt(lang)}` if (browser) { if (dev) { @@ -311,6 +311,10 @@ python: 'black' } }) + } else if (lang === 'go') { + connectToLanguageServer(`wss://${$page.url.host}/ws/go`, 'go', { + 'build.allowImplicitNetworkAccess': true + }) } websocketInterval && clearInterval(websocketInterval) @@ -320,7 +324,12 @@ !lastWsAttempt || (new Date().getTime() - lastWsAttempt.getTime() > 60000 && nbWsAttempt < 2) ) { - if (!websocketAlive.black && !websocketAlive.deno && !websocketAlive.pyright) { + if ( + !websocketAlive.black && + !websocketAlive.deno && + !websocketAlive.pyright && + !websocketAlive.go + ) { console.log('reconnecting to language servers') lastWsAttempt = new Date() nbWsAttempt++ @@ -393,6 +402,7 @@ !websocketAlive.black && !websocketAlive.deno && !websocketAlive.pyright && + !websocketAlive.go && !websocketInterval ) { reloadWebsocket() diff --git a/frontend/src/lib/components/EditorBar.svelte b/frontend/src/lib/components/EditorBar.svelte index 7a4a694a52..e169d5eff8 100644 --- a/frontend/src/lib/components/EditorBar.svelte +++ b/frontend/src/lib/components/EditorBar.svelte @@ -24,7 +24,7 @@ export let lang: 'python3' | 'deno' | 'go' export let editor: Editor - export let websocketAlive: { pyright: boolean; black: boolean; deno: boolean } + export let websocketAlive: { pyright: boolean; black: boolean; deno: boolean; go: boolean } export let iconOnly: boolean = false let contextualVariablePicker: ItemPicker @@ -282,6 +282,8 @@ {#if lang == 'deno'} (Deno) + {:else if lang == 'go'} + (Go) {:else if lang == 'python3'} (Pyright Black) diff --git a/frontend/src/lib/editorUtils.ts b/frontend/src/lib/editorUtils.ts index 82b9823154..6653c05bd6 100644 --- a/frontend/src/lib/editorUtils.ts +++ b/frontend/src/lib/editorUtils.ts @@ -41,6 +41,8 @@ export function langToExt(lang: string): string { return 'ts' case 'python': return 'py' + case 'go': + return 'go' default: return 'unknown' } diff --git a/frontend/src/lib/script_helpers.ts b/frontend/src/lib/script_helpers.ts index 9769ab9526..08f9c28f10 100644 --- a/frontend/src/lib/script_helpers.ts +++ b/frontend/src/lib/script_helpers.ts @@ -49,7 +49,9 @@ export async function main( } ` -export const GO_INIT_CODE = `import ( +export const GO_INIT_CODE = `package inner + +import ( "fmt" "rsc.io/quote" ) @@ -61,7 +63,9 @@ func main(x string) (interface{}, error) { } ` -export const GO_FAILURE_MODULE_CODE = `import ( +export const GO_FAILURE_MODULE_CODE = `package inner + +import ( "fmt" "os" ) diff --git a/lsp/Dockerfile b/lsp/Dockerfile index 1015c538aa..33774bc0ed 100644 --- a/lsp/Dockerfile +++ b/lsp/Dockerfile @@ -2,6 +2,11 @@ FROM nikolaik/python-nodejs RUN yarn global add diagnostic-languageserver RUN yarn global add pyright +RUN wget https://golang.org/dl/go1.19.1.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.19.1.linux-amd64.tar.gz +ENV PATH="${PATH}:/usr/local/go/bin:/root/go/bin" +ENV GO_PATH=/usr/local/go/bin/go +ENV GOROOT=/usr/local/go +RUN go install -v golang.org/x/tools/gopls@latest RUN pip3 install black tornado python-lsp-jsonrpc COPY --from=denoland/deno:latest /usr/bin/deno /usr/bin/deno diff --git a/lsp/Pipfile b/lsp/Pipfile index 1adcac305e..4eabe40892 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -4,8 +4,8 @@ verify_ssl = true name = "pypi" [packages] -wmill = ">=1.36.0" -wmill_pg = ">=1.36.0" +wmill = ">=1.34.0" +wmill_pg = ">=1.34.0" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/lsp/pyls_launcher.py b/lsp/pyls_launcher.py index b6387773cc..b25c2839dc 100644 --- a/lsp/pyls_launcher.py +++ b/lsp/pyls_launcher.py @@ -75,12 +75,26 @@ class DenoLS(LanguageServerWebSocketHandler): procargs = ["deno", "lsp"] +class GoLS(LanguageServerWebSocketHandler): + procargs = ["gopls", "serve"] + + if __name__ == "__main__": + + monaco_path = '/tmp/monaco' + os.makedirs(monaco_path, exist_ok=True) + print("The monaco directory is created!") + go_mod_path = os.path.join(monaco_path, 'go.mod') + if not os.path.exists(go_mod_path): + f = open(go_mod_path, "w") + f.write("module mymod\ngo 1.19") + f.close() port = int(os.environ.get("PORT", "3001")) app = web.Application([ (r"/ws/pyright", PyrightLS), (r"/ws/black", DiagnosticLS), (r"/ws/deno", DenoLS), + (r"/ws/go", GoLS), ]) app.listen(port, address="0.0.0.0") ioloop.IOLoop.current().start() diff --git a/python-client/build.sh b/python-client/build.sh index 21b25ea6a5..649c330da0 100755 --- a/python-client/build.sh +++ b/python-client/build.sh @@ -3,7 +3,7 @@ set -e #TODO: remove once openapi-python-client supports recursive values cp ../openflow.openapi.yaml ../openflow.openapi.yaml.tmp -sed -z 's/ ForloopFlow:\n type: object\n properties:\n value:\n $ref: "#\/components\/schemas\/FlowValue"/ ForloopFlow:\n type: object\n properties:/' ../openflow.openapi.yaml > ../openflow.openapi.yaml.new +sed -z 's/ ForloopFlow:\n type: object\n properties:\n modules:\n type: array\n items:\n $ref: "#\/components\/schemas\/FlowModule"/ ForloopFlow:\n type: object\n properties:/' ../openflow.openapi.yaml > ../openflow.openapi.yaml.new mv ../openflow.openapi.yaml.new ../openflow.openapi.yaml cp ../backend/openapi.yaml openapi.yaml diff --git a/python-client/windmill-api/.gitignore b/python-client/windmill-api/.gitignore new file mode 100644 index 0000000000..ed29cb9779 --- /dev/null +++ b/python-client/windmill-api/.gitignore @@ -0,0 +1,23 @@ +__pycache__/ +build/ +dist/ +*.egg-info/ +.pytest_cache/ + +# pyenv +.python-version + +# Environments +.env +.venv + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# JetBrains +.idea/ + +/coverage.xml +/.coverage \ No newline at end of file diff --git a/python-client/windmill-api/LICENSE b/python-client/windmill-api/LICENSE new file mode 100644 index 0000000000..b271f17a84 --- /dev/null +++ b/python-client/windmill-api/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2022 Windmill Labs, Inc + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/python-client/windmill-api/README.md b/python-client/windmill-api/README.md new file mode 100644 index 0000000000..0a2085848e --- /dev/null +++ b/python-client/windmill-api/README.md @@ -0,0 +1,77 @@ +# Autogenerated Windmill OpenApi Client +This is the raw autogenerated api client. You are most likely more interested in [wmill](https://pypi.org/project/wmill/) which leverages this client to offer an user friendly experience. We use [this openapi python client generator](https://github.com/openapi-generators/openapi-python-client/) + +# windmill-api +A client library for accessing Windmill server API + +## Usage +First, create a client: + +```python +from windmill_api import Client + +client = Client(base_url="https://api.example.com") +``` + +If the endpoints you're going to hit require authentication, use `AuthenticatedClient` instead: + +```python +from windmill_api import AuthenticatedClient + +client = AuthenticatedClient(base_url="https://api.example.com", token="SuperSecretToken") +``` + +Now call your endpoint and use your models: + +```python +from windmill_api.models import MyDataModel +from windmill_api.api.my_tag import get_my_data_model +from windmill_api.types import Response + +my_data: MyDataModel = get_my_data_model.sync(client=client) +# or if you need more info (e.g. status_code) +response: Response[MyDataModel] = get_my_data_model.sync_detailed(client=client) +``` + +Or do the same thing with an async version: + +```python +from windmill_api.models import MyDataModel +from windmill_api.api.my_tag import get_my_data_model +from windmill_api.types import Response + +my_data: MyDataModel = await get_my_data_model.asyncio(client=client) +response: Response[MyDataModel] = await get_my_data_model.asyncio_detailed(client=client) +``` + +By default, when you're calling an HTTPS API it will attempt to verify that SSL is working correctly. Using certificate verification is highly recommended most of the time, but sometimes you may need to authenticate to a server (especially an internal server) using a custom certificate bundle. + +```python +client = AuthenticatedClient( + base_url="https://internal_api.example.com", + token="SuperSecretToken", + verify_ssl="/path/to/certificate_bundle.pem", +) +``` + +You can also disable certificate validation altogether, but beware that **this is a security risk**. + +```python +client = AuthenticatedClient( + base_url="https://internal_api.example.com", + token="SuperSecretToken", + verify_ssl=False +) +``` + +Things to know: +1. Every path/method combo becomes a Python module with four functions: + 1. `sync`: Blocking request that returns parsed data (if successful) or `None` + 1. `sync_detailed`: Blocking request that always returns a `Request`, optionally with `parsed` set if the request was successful. + 1. `asyncio`: Like `sync` but the async instead of blocking + 1. `asyncio_detailed`: Like `sync_detailed` by async instead of blocking + +1. All path/query params, and bodies become method arguments. +1. If your endpoint had any tags on it, the first tag will be used as a module name for the function (my_tag above) +1. Any endpoint which did not have a tag will be in `windmill_api.api.default` + diff --git a/python-client/windmill-api/pyproject.toml b/python-client/windmill-api/pyproject.toml new file mode 100644 index 0000000000..6e0356efa9 --- /dev/null +++ b/python-client/windmill-api/pyproject.toml @@ -0,0 +1,40 @@ +[tool.poetry] +name = "windmill-api" +version = "1.36.0" +description = "A client library for accessing Windmill server API" +license = "Apache-2.0" + +authors = ["Ruben Fiszel "] + +readme = "README.md" +packages = [ + {include = "windmill_api"}, +] +include = ["CHANGELOG.md", "windmill_api/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" +httpx = ">=0.15.4,<0.23.0" +attrs = ">=21.3.0" +python-dateutil = "^2.8.0" + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" + +[tool.black] +line-length = 120 +target_version = ['py37', 'py38', 'py39'] +exclude = ''' +( + /( + | \.git + | \.venv + | \.mypy_cache + )/ +) +''' + +[tool.isort] +line_length = 120 +profile = "black" \ No newline at end of file diff --git a/python-client/windmill-api/windmill_api/__init__.py b/python-client/windmill-api/windmill_api/__init__.py new file mode 100644 index 0000000000..b1202ed58d --- /dev/null +++ b/python-client/windmill-api/windmill_api/__init__.py @@ -0,0 +1,2 @@ +""" A client library for accessing Windmill server API """ +from .client import AuthenticatedClient, Client diff --git a/python-client/windmill-api/windmill_api/api/__init__.py b/python-client/windmill-api/windmill_api/api/__init__.py new file mode 100644 index 0000000000..dc035f4ce8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/__init__.py @@ -0,0 +1 @@ +""" Contains methods for accessing the API """ diff --git a/python-client/windmill-api/windmill_api/api/audit/__init__.py b/python-client/windmill-api/windmill_api/api/audit/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/python-client/windmill-api/windmill_api/api/audit/get_audit_log.py b/python-client/windmill-api/windmill_api/api/audit/get_audit_log.py new file mode 100644 index 0000000000..f333f68be3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/audit/get_audit_log.py @@ -0,0 +1,150 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.get_audit_log_response_200 import GetAuditLogResponse200 +from ...types import Response + + +def _get_kwargs( + workspace: str, + id: int, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/audit/get/{id}".format(client.base_url, workspace=workspace, id=id) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[GetAuditLogResponse200]: + if response.status_code == 200: + response_200 = GetAuditLogResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[GetAuditLogResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + id: int, + *, + client: Client, +) -> Response[GetAuditLogResponse200]: + """get audit log (requires admin privilege) + + Args: + workspace (str): + id (int): + + Returns: + Response[GetAuditLogResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + id=id, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + id: int, + *, + client: Client, +) -> Optional[GetAuditLogResponse200]: + """get audit log (requires admin privilege) + + Args: + workspace (str): + id (int): + + Returns: + Response[GetAuditLogResponse200] + """ + + return sync_detailed( + workspace=workspace, + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + id: int, + *, + client: Client, +) -> Response[GetAuditLogResponse200]: + """get audit log (requires admin privilege) + + Args: + workspace (str): + id (int): + + Returns: + Response[GetAuditLogResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + id=id, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + id: int, + *, + client: Client, +) -> Optional[GetAuditLogResponse200]: + """get audit log (requires admin privilege) + + Args: + workspace (str): + id (int): + + Returns: + Response[GetAuditLogResponse200] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + id=id, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/audit/list_audit_logs.py b/python-client/windmill-api/windmill_api/api/audit/list_audit_logs.py new file mode 100644 index 0000000000..cd375e495b --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/audit/list_audit_logs.py @@ -0,0 +1,280 @@ +import datetime +from typing import Any, Dict, List, Optional, Union + +import httpx + +from ...client import Client +from ...models.list_audit_logs_action_kind import ListAuditLogsActionKind +from ...models.list_audit_logs_response_200_item import ListAuditLogsResponse200Item +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, + before: Union[Unset, None, datetime.datetime] = UNSET, + after: Union[Unset, None, datetime.datetime] = UNSET, + username: Union[Unset, None, str] = UNSET, + operation: Union[Unset, None, str] = UNSET, + resource: Union[Unset, None, str] = UNSET, + action_kind: Union[Unset, None, ListAuditLogsActionKind] = UNSET, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/audit/list".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + params: Dict[str, Any] = {} + params["page"] = page + + params["per_page"] = per_page + + json_before: Union[Unset, None, str] = UNSET + if not isinstance(before, Unset): + json_before = before.isoformat() if before else None + + params["before"] = json_before + + json_after: Union[Unset, None, str] = UNSET + if not isinstance(after, Unset): + json_after = after.isoformat() if after else None + + params["after"] = json_after + + params["username"] = username + + params["operation"] = operation + + params["resource"] = resource + + json_action_kind: Union[Unset, None, str] = UNSET + if not isinstance(action_kind, Unset): + json_action_kind = action_kind.value if action_kind else None + + params["action_kind"] = json_action_kind + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "params": params, + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[ListAuditLogsResponse200Item]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = ListAuditLogsResponse200Item.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[ListAuditLogsResponse200Item]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, + before: Union[Unset, None, datetime.datetime] = UNSET, + after: Union[Unset, None, datetime.datetime] = UNSET, + username: Union[Unset, None, str] = UNSET, + operation: Union[Unset, None, str] = UNSET, + resource: Union[Unset, None, str] = UNSET, + action_kind: Union[Unset, None, ListAuditLogsActionKind] = UNSET, +) -> Response[List[ListAuditLogsResponse200Item]]: + """list audit logs (requires admin privilege) + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + before (Union[Unset, None, datetime.datetime]): + after (Union[Unset, None, datetime.datetime]): + username (Union[Unset, None, str]): + operation (Union[Unset, None, str]): + resource (Union[Unset, None, str]): + action_kind (Union[Unset, None, ListAuditLogsActionKind]): + + Returns: + Response[List[ListAuditLogsResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + before=before, + after=after, + username=username, + operation=operation, + resource=resource, + action_kind=action_kind, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, + before: Union[Unset, None, datetime.datetime] = UNSET, + after: Union[Unset, None, datetime.datetime] = UNSET, + username: Union[Unset, None, str] = UNSET, + operation: Union[Unset, None, str] = UNSET, + resource: Union[Unset, None, str] = UNSET, + action_kind: Union[Unset, None, ListAuditLogsActionKind] = UNSET, +) -> Optional[List[ListAuditLogsResponse200Item]]: + """list audit logs (requires admin privilege) + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + before (Union[Unset, None, datetime.datetime]): + after (Union[Unset, None, datetime.datetime]): + username (Union[Unset, None, str]): + operation (Union[Unset, None, str]): + resource (Union[Unset, None, str]): + action_kind (Union[Unset, None, ListAuditLogsActionKind]): + + Returns: + Response[List[ListAuditLogsResponse200Item]] + """ + + return sync_detailed( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + before=before, + after=after, + username=username, + operation=operation, + resource=resource, + action_kind=action_kind, + ).parsed + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, + before: Union[Unset, None, datetime.datetime] = UNSET, + after: Union[Unset, None, datetime.datetime] = UNSET, + username: Union[Unset, None, str] = UNSET, + operation: Union[Unset, None, str] = UNSET, + resource: Union[Unset, None, str] = UNSET, + action_kind: Union[Unset, None, ListAuditLogsActionKind] = UNSET, +) -> Response[List[ListAuditLogsResponse200Item]]: + """list audit logs (requires admin privilege) + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + before (Union[Unset, None, datetime.datetime]): + after (Union[Unset, None, datetime.datetime]): + username (Union[Unset, None, str]): + operation (Union[Unset, None, str]): + resource (Union[Unset, None, str]): + action_kind (Union[Unset, None, ListAuditLogsActionKind]): + + Returns: + Response[List[ListAuditLogsResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + before=before, + after=after, + username=username, + operation=operation, + resource=resource, + action_kind=action_kind, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, + before: Union[Unset, None, datetime.datetime] = UNSET, + after: Union[Unset, None, datetime.datetime] = UNSET, + username: Union[Unset, None, str] = UNSET, + operation: Union[Unset, None, str] = UNSET, + resource: Union[Unset, None, str] = UNSET, + action_kind: Union[Unset, None, ListAuditLogsActionKind] = UNSET, +) -> Optional[List[ListAuditLogsResponse200Item]]: + """list audit logs (requires admin privilege) + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + before (Union[Unset, None, datetime.datetime]): + after (Union[Unset, None, datetime.datetime]): + username (Union[Unset, None, str]): + operation (Union[Unset, None, str]): + resource (Union[Unset, None, str]): + action_kind (Union[Unset, None, ListAuditLogsActionKind]): + + Returns: + Response[List[ListAuditLogsResponse200Item]] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + before=before, + after=after, + username=username, + operation=operation, + resource=resource, + action_kind=action_kind, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/flow/__init__.py b/python-client/windmill-api/windmill_api/api/flow/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/python-client/windmill-api/windmill_api/api/flow/archive_flow_by_path.py b/python-client/windmill-api/windmill_api/api/flow/archive_flow_by_path.py new file mode 100644 index 0000000000..fcc80721c4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/flow/archive_flow_by_path.py @@ -0,0 +1,93 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/flows/archive/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[Any]: + """archive flow by path + + Args: + workspace (str): + path (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[Any]: + """archive flow by path + + Args: + workspace (str): + path (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/flow/create_flow.py b/python-client/windmill-api/windmill_api/api/flow/create_flow.py new file mode 100644 index 0000000000..a2528b3eaa --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/flow/create_flow.py @@ -0,0 +1,97 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.create_flow_json_body import CreateFlowJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, + json_body: CreateFlowJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/flows/create".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + json_body: CreateFlowJsonBody, +) -> Response[Any]: + """create flow + + Args: + workspace (str): + json_body (CreateFlowJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + json_body: CreateFlowJsonBody, +) -> Response[Any]: + """create flow + + Args: + workspace (str): + json_body (CreateFlowJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/flow/exists_flow_by_path.py b/python-client/windmill-api/windmill_api/api/flow/exists_flow_by_path.py new file mode 100644 index 0000000000..23fe4035eb --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/flow/exists_flow_by_path.py @@ -0,0 +1,148 @@ +from typing import Any, Dict, Optional, cast + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/flows/exists/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[bool]: + if response.status_code == 200: + response_200 = cast(bool, response.json()) + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[bool]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[bool]: + """exists flow by path + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + path: str, + *, + client: Client, +) -> Optional[bool]: + """exists flow by path + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + return sync_detailed( + workspace=workspace, + path=path, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[bool]: + """exists flow by path + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + path: str, + *, + client: Client, +) -> Optional[bool]: + """exists flow by path + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + path=path, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/flow/get_flow_by_path.py b/python-client/windmill-api/windmill_api/api/flow/get_flow_by_path.py new file mode 100644 index 0000000000..2662760ecb --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/flow/get_flow_by_path.py @@ -0,0 +1,150 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.get_flow_by_path_response_200 import GetFlowByPathResponse200 +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/flows/get/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[GetFlowByPathResponse200]: + if response.status_code == 200: + response_200 = GetFlowByPathResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[GetFlowByPathResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[GetFlowByPathResponse200]: + """get flow by path + + Args: + workspace (str): + path (str): + + Returns: + Response[GetFlowByPathResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + path: str, + *, + client: Client, +) -> Optional[GetFlowByPathResponse200]: + """get flow by path + + Args: + workspace (str): + path (str): + + Returns: + Response[GetFlowByPathResponse200] + """ + + return sync_detailed( + workspace=workspace, + path=path, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[GetFlowByPathResponse200]: + """get flow by path + + Args: + workspace (str): + path (str): + + Returns: + Response[GetFlowByPathResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + path: str, + *, + client: Client, +) -> Optional[GetFlowByPathResponse200]: + """get flow by path + + Args: + workspace (str): + path (str): + + Returns: + Response[GetFlowByPathResponse200] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + path=path, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/flow/get_hub_flow_by_id.py b/python-client/windmill-api/windmill_api/api/flow/get_hub_flow_by_id.py new file mode 100644 index 0000000000..50f69c35f9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/flow/get_hub_flow_by_id.py @@ -0,0 +1,137 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.get_hub_flow_by_id_response_200 import GetHubFlowByIdResponse200 +from ...types import Response + + +def _get_kwargs( + id: int, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/flows/hub/get/{id}".format(client.base_url, id=id) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[GetHubFlowByIdResponse200]: + if response.status_code == 200: + response_200 = GetHubFlowByIdResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[GetHubFlowByIdResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + id: int, + *, + client: Client, +) -> Response[GetHubFlowByIdResponse200]: + """get hub flow by id + + Args: + id (int): + + Returns: + Response[GetHubFlowByIdResponse200] + """ + + kwargs = _get_kwargs( + id=id, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + id: int, + *, + client: Client, +) -> Optional[GetHubFlowByIdResponse200]: + """get hub flow by id + + Args: + id (int): + + Returns: + Response[GetHubFlowByIdResponse200] + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: int, + *, + client: Client, +) -> Response[GetHubFlowByIdResponse200]: + """get hub flow by id + + Args: + id (int): + + Returns: + Response[GetHubFlowByIdResponse200] + """ + + kwargs = _get_kwargs( + id=id, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + id: int, + *, + client: Client, +) -> Optional[GetHubFlowByIdResponse200]: + """get hub flow by id + + Args: + id (int): + + Returns: + Response[GetHubFlowByIdResponse200] + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/flow/list_flows.py b/python-client/windmill-api/windmill_api/api/flow/list_flows.py new file mode 100644 index 0000000000..10c0034251 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/flow/list_flows.py @@ -0,0 +1,251 @@ +from typing import Any, Dict, List, Optional, Union + +import httpx + +from ...client import Client +from ...models.list_flows_response_200_item import ListFlowsResponse200Item +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, + order_desc: Union[Unset, None, bool] = UNSET, + created_by: Union[Unset, None, str] = UNSET, + path_start: Union[Unset, None, str] = UNSET, + path_exact: Union[Unset, None, str] = UNSET, + show_archived: Union[Unset, None, bool] = UNSET, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/flows/list".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + params: Dict[str, Any] = {} + params["page"] = page + + params["per_page"] = per_page + + params["order_desc"] = order_desc + + params["created_by"] = created_by + + params["path_start"] = path_start + + params["path_exact"] = path_exact + + params["show_archived"] = show_archived + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "params": params, + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[ListFlowsResponse200Item]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = ListFlowsResponse200Item.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[ListFlowsResponse200Item]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, + order_desc: Union[Unset, None, bool] = UNSET, + created_by: Union[Unset, None, str] = UNSET, + path_start: Union[Unset, None, str] = UNSET, + path_exact: Union[Unset, None, str] = UNSET, + show_archived: Union[Unset, None, bool] = UNSET, +) -> Response[List[ListFlowsResponse200Item]]: + """list all available flows + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + order_desc (Union[Unset, None, bool]): + created_by (Union[Unset, None, str]): + path_start (Union[Unset, None, str]): + path_exact (Union[Unset, None, str]): + show_archived (Union[Unset, None, bool]): + + Returns: + Response[List[ListFlowsResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + order_desc=order_desc, + created_by=created_by, + path_start=path_start, + path_exact=path_exact, + show_archived=show_archived, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, + order_desc: Union[Unset, None, bool] = UNSET, + created_by: Union[Unset, None, str] = UNSET, + path_start: Union[Unset, None, str] = UNSET, + path_exact: Union[Unset, None, str] = UNSET, + show_archived: Union[Unset, None, bool] = UNSET, +) -> Optional[List[ListFlowsResponse200Item]]: + """list all available flows + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + order_desc (Union[Unset, None, bool]): + created_by (Union[Unset, None, str]): + path_start (Union[Unset, None, str]): + path_exact (Union[Unset, None, str]): + show_archived (Union[Unset, None, bool]): + + Returns: + Response[List[ListFlowsResponse200Item]] + """ + + return sync_detailed( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + order_desc=order_desc, + created_by=created_by, + path_start=path_start, + path_exact=path_exact, + show_archived=show_archived, + ).parsed + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, + order_desc: Union[Unset, None, bool] = UNSET, + created_by: Union[Unset, None, str] = UNSET, + path_start: Union[Unset, None, str] = UNSET, + path_exact: Union[Unset, None, str] = UNSET, + show_archived: Union[Unset, None, bool] = UNSET, +) -> Response[List[ListFlowsResponse200Item]]: + """list all available flows + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + order_desc (Union[Unset, None, bool]): + created_by (Union[Unset, None, str]): + path_start (Union[Unset, None, str]): + path_exact (Union[Unset, None, str]): + show_archived (Union[Unset, None, bool]): + + Returns: + Response[List[ListFlowsResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + order_desc=order_desc, + created_by=created_by, + path_start=path_start, + path_exact=path_exact, + show_archived=show_archived, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, + order_desc: Union[Unset, None, bool] = UNSET, + created_by: Union[Unset, None, str] = UNSET, + path_start: Union[Unset, None, str] = UNSET, + path_exact: Union[Unset, None, str] = UNSET, + show_archived: Union[Unset, None, bool] = UNSET, +) -> Optional[List[ListFlowsResponse200Item]]: + """list all available flows + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + order_desc (Union[Unset, None, bool]): + created_by (Union[Unset, None, str]): + path_start (Union[Unset, None, str]): + path_exact (Union[Unset, None, str]): + show_archived (Union[Unset, None, bool]): + + Returns: + Response[List[ListFlowsResponse200Item]] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + order_desc=order_desc, + created_by=created_by, + path_start=path_start, + path_exact=path_exact, + show_archived=show_archived, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/flow/list_hub_flows.py b/python-client/windmill-api/windmill_api/api/flow/list_hub_flows.py new file mode 100644 index 0000000000..96709b6a17 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/flow/list_hub_flows.py @@ -0,0 +1,116 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.list_hub_flows_response_200 import ListHubFlowsResponse200 +from ...types import Response + + +def _get_kwargs( + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/flows/hub/list".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[ListHubFlowsResponse200]: + if response.status_code == 200: + response_200 = ListHubFlowsResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[ListHubFlowsResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + *, + client: Client, +) -> Response[ListHubFlowsResponse200]: + """list all available hub flows + + Returns: + Response[ListHubFlowsResponse200] + """ + + kwargs = _get_kwargs( + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + *, + client: Client, +) -> Optional[ListHubFlowsResponse200]: + """list all available hub flows + + Returns: + Response[ListHubFlowsResponse200] + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: Client, +) -> Response[ListHubFlowsResponse200]: + """list all available hub flows + + Returns: + Response[ListHubFlowsResponse200] + """ + + kwargs = _get_kwargs( + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + *, + client: Client, +) -> Optional[ListHubFlowsResponse200]: + """list all available hub flows + + Returns: + Response[ListHubFlowsResponse200] + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/flow/update_flow.py b/python-client/windmill-api/windmill_api/api/flow/update_flow.py new file mode 100644 index 0000000000..0111546181 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/flow/update_flow.py @@ -0,0 +1,104 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.update_flow_json_body import UpdateFlowJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, + json_body: UpdateFlowJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/flows/update/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, + json_body: UpdateFlowJsonBody, +) -> Response[Any]: + """update flow + + Args: + workspace (str): + path (str): + json_body (UpdateFlowJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, + json_body: UpdateFlowJsonBody, +) -> Response[Any]: + """update flow + + Args: + workspace (str): + path (str): + json_body (UpdateFlowJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/granular_acl/__init__.py b/python-client/windmill-api/windmill_api/api/granular_acl/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/python-client/windmill-api/windmill_api/api/granular_acl/add_granular_acls.py b/python-client/windmill-api/windmill_api/api/granular_acl/add_granular_acls.py new file mode 100644 index 0000000000..f235951bbe --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/granular_acl/add_granular_acls.py @@ -0,0 +1,112 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.add_granular_acls_json_body import AddGranularAclsJsonBody +from ...models.add_granular_acls_kind import AddGranularAclsKind +from ...types import Response + + +def _get_kwargs( + workspace: str, + kind: AddGranularAclsKind, + path: str, + *, + client: Client, + json_body: AddGranularAclsJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/acls/add/{kind}/{path}".format(client.base_url, workspace=workspace, kind=kind, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + kind: AddGranularAclsKind, + path: str, + *, + client: Client, + json_body: AddGranularAclsJsonBody, +) -> Response[Any]: + """add granular acls + + Args: + workspace (str): + kind (AddGranularAclsKind): + path (str): + json_body (AddGranularAclsJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + kind=kind, + path=path, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + kind: AddGranularAclsKind, + path: str, + *, + client: Client, + json_body: AddGranularAclsJsonBody, +) -> Response[Any]: + """add granular acls + + Args: + workspace (str): + kind (AddGranularAclsKind): + path (str): + json_body (AddGranularAclsJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + kind=kind, + path=path, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/granular_acl/get_granular_acls.py b/python-client/windmill-api/windmill_api/api/granular_acl/get_granular_acls.py new file mode 100644 index 0000000000..3d3f9eb80c --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/granular_acl/get_granular_acls.py @@ -0,0 +1,164 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.get_granular_acls_kind import GetGranularAclsKind +from ...models.get_granular_acls_response_200 import GetGranularAclsResponse200 +from ...types import Response + + +def _get_kwargs( + workspace: str, + kind: GetGranularAclsKind, + path: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/acls/get/{kind}/{path}".format(client.base_url, workspace=workspace, kind=kind, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[GetGranularAclsResponse200]: + if response.status_code == 200: + response_200 = GetGranularAclsResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[GetGranularAclsResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + kind: GetGranularAclsKind, + path: str, + *, + client: Client, +) -> Response[GetGranularAclsResponse200]: + """get granular acls + + Args: + workspace (str): + kind (GetGranularAclsKind): + path (str): + + Returns: + Response[GetGranularAclsResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + kind=kind, + path=path, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + kind: GetGranularAclsKind, + path: str, + *, + client: Client, +) -> Optional[GetGranularAclsResponse200]: + """get granular acls + + Args: + workspace (str): + kind (GetGranularAclsKind): + path (str): + + Returns: + Response[GetGranularAclsResponse200] + """ + + return sync_detailed( + workspace=workspace, + kind=kind, + path=path, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + kind: GetGranularAclsKind, + path: str, + *, + client: Client, +) -> Response[GetGranularAclsResponse200]: + """get granular acls + + Args: + workspace (str): + kind (GetGranularAclsKind): + path (str): + + Returns: + Response[GetGranularAclsResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + kind=kind, + path=path, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + kind: GetGranularAclsKind, + path: str, + *, + client: Client, +) -> Optional[GetGranularAclsResponse200]: + """get granular acls + + Args: + workspace (str): + kind (GetGranularAclsKind): + path (str): + + Returns: + Response[GetGranularAclsResponse200] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + kind=kind, + path=path, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/granular_acl/remove_granular_acls.py b/python-client/windmill-api/windmill_api/api/granular_acl/remove_granular_acls.py new file mode 100644 index 0000000000..59b82fd1e2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/granular_acl/remove_granular_acls.py @@ -0,0 +1,114 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.remove_granular_acls_json_body import RemoveGranularAclsJsonBody +from ...models.remove_granular_acls_kind import RemoveGranularAclsKind +from ...types import Response + + +def _get_kwargs( + workspace: str, + kind: RemoveGranularAclsKind, + path: str, + *, + client: Client, + json_body: RemoveGranularAclsJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/acls/remove/{kind}/{path}".format( + client.base_url, workspace=workspace, kind=kind, path=path + ) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + kind: RemoveGranularAclsKind, + path: str, + *, + client: Client, + json_body: RemoveGranularAclsJsonBody, +) -> Response[Any]: + """remove granular acls + + Args: + workspace (str): + kind (RemoveGranularAclsKind): + path (str): + json_body (RemoveGranularAclsJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + kind=kind, + path=path, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + kind: RemoveGranularAclsKind, + path: str, + *, + client: Client, + json_body: RemoveGranularAclsJsonBody, +) -> Response[Any]: + """remove granular acls + + Args: + workspace (str): + kind (RemoveGranularAclsKind): + path (str): + json_body (RemoveGranularAclsJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + kind=kind, + path=path, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/group/__init__.py b/python-client/windmill-api/windmill_api/api/group/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/python-client/windmill-api/windmill_api/api/group/add_user_to_group.py b/python-client/windmill-api/windmill_api/api/group/add_user_to_group.py new file mode 100644 index 0000000000..dee7d28845 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/group/add_user_to_group.py @@ -0,0 +1,104 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.add_user_to_group_json_body import AddUserToGroupJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + name: str, + *, + client: Client, + json_body: AddUserToGroupJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/groups/adduser/{name}".format(client.base_url, workspace=workspace, name=name) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + name: str, + *, + client: Client, + json_body: AddUserToGroupJsonBody, +) -> Response[Any]: + """add user to group + + Args: + workspace (str): + name (str): + json_body (AddUserToGroupJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + name=name, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + name: str, + *, + client: Client, + json_body: AddUserToGroupJsonBody, +) -> Response[Any]: + """add user to group + + Args: + workspace (str): + name (str): + json_body (AddUserToGroupJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + name=name, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/group/create_group.py b/python-client/windmill-api/windmill_api/api/group/create_group.py new file mode 100644 index 0000000000..55b8b1d6e5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/group/create_group.py @@ -0,0 +1,97 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.create_group_json_body import CreateGroupJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, + json_body: CreateGroupJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/groups/create".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + json_body: CreateGroupJsonBody, +) -> Response[Any]: + """create group + + Args: + workspace (str): + json_body (CreateGroupJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + json_body: CreateGroupJsonBody, +) -> Response[Any]: + """create group + + Args: + workspace (str): + json_body (CreateGroupJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/group/delete_group.py b/python-client/windmill-api/windmill_api/api/group/delete_group.py new file mode 100644 index 0000000000..929e8da673 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/group/delete_group.py @@ -0,0 +1,93 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + workspace: str, + name: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/groups/delete/{name}".format(client.base_url, workspace=workspace, name=name) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "delete", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + name: str, + *, + client: Client, +) -> Response[Any]: + """delete group + + Args: + workspace (str): + name (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + name=name, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + name: str, + *, + client: Client, +) -> Response[Any]: + """delete group + + Args: + workspace (str): + name (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + name=name, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/group/get_group.py b/python-client/windmill-api/windmill_api/api/group/get_group.py new file mode 100644 index 0000000000..764f15e6a9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/group/get_group.py @@ -0,0 +1,150 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.get_group_response_200 import GetGroupResponse200 +from ...types import Response + + +def _get_kwargs( + workspace: str, + name: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/groups/get/{name}".format(client.base_url, workspace=workspace, name=name) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[GetGroupResponse200]: + if response.status_code == 200: + response_200 = GetGroupResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[GetGroupResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + name: str, + *, + client: Client, +) -> Response[GetGroupResponse200]: + """get group + + Args: + workspace (str): + name (str): + + Returns: + Response[GetGroupResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + name=name, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + name: str, + *, + client: Client, +) -> Optional[GetGroupResponse200]: + """get group + + Args: + workspace (str): + name (str): + + Returns: + Response[GetGroupResponse200] + """ + + return sync_detailed( + workspace=workspace, + name=name, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + name: str, + *, + client: Client, +) -> Response[GetGroupResponse200]: + """get group + + Args: + workspace (str): + name (str): + + Returns: + Response[GetGroupResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + name=name, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + name: str, + *, + client: Client, +) -> Optional[GetGroupResponse200]: + """get group + + Args: + workspace (str): + name (str): + + Returns: + Response[GetGroupResponse200] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + name=name, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/group/list_group_names.py b/python-client/windmill-api/windmill_api/api/group/list_group_names.py new file mode 100644 index 0000000000..0f44fb3d9b --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/group/list_group_names.py @@ -0,0 +1,136 @@ +from typing import Any, Dict, List, Optional, cast + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/groups/listnames".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[str]]: + if response.status_code == 200: + response_200 = cast(List[str], response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[str]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, +) -> Response[List[str]]: + """list group names + + Args: + workspace (str): + + Returns: + Response[List[str]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + *, + client: Client, +) -> Optional[List[str]]: + """list group names + + Args: + workspace (str): + + Returns: + Response[List[str]] + """ + + return sync_detailed( + workspace=workspace, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, +) -> Response[List[str]]: + """list group names + + Args: + workspace (str): + + Returns: + Response[List[str]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + *, + client: Client, +) -> Optional[List[str]]: + """list group names + + Args: + workspace (str): + + Returns: + Response[List[str]] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/group/list_groups.py b/python-client/windmill-api/windmill_api/api/group/list_groups.py new file mode 100644 index 0000000000..ce0fe8c2ef --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/group/list_groups.py @@ -0,0 +1,176 @@ +from typing import Any, Dict, List, Optional, Union + +import httpx + +from ...client import Client +from ...models.list_groups_response_200_item import ListGroupsResponse200Item +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/groups/list".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + params: Dict[str, Any] = {} + params["page"] = page + + params["per_page"] = per_page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "params": params, + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[ListGroupsResponse200Item]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = ListGroupsResponse200Item.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[ListGroupsResponse200Item]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Response[List[ListGroupsResponse200Item]]: + """list groups + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + + Returns: + Response[List[ListGroupsResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Optional[List[ListGroupsResponse200Item]]: + """list groups + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + + Returns: + Response[List[ListGroupsResponse200Item]] + """ + + return sync_detailed( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + ).parsed + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Response[List[ListGroupsResponse200Item]]: + """list groups + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + + Returns: + Response[List[ListGroupsResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Optional[List[ListGroupsResponse200Item]]: + """list groups + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + + Returns: + Response[List[ListGroupsResponse200Item]] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/group/remove_user_to_group.py b/python-client/windmill-api/windmill_api/api/group/remove_user_to_group.py new file mode 100644 index 0000000000..29adc1b28c --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/group/remove_user_to_group.py @@ -0,0 +1,104 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.remove_user_to_group_json_body import RemoveUserToGroupJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + name: str, + *, + client: Client, + json_body: RemoveUserToGroupJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/groups/removeuser/{name}".format(client.base_url, workspace=workspace, name=name) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + name: str, + *, + client: Client, + json_body: RemoveUserToGroupJsonBody, +) -> Response[Any]: + """remove user to group + + Args: + workspace (str): + name (str): + json_body (RemoveUserToGroupJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + name=name, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + name: str, + *, + client: Client, + json_body: RemoveUserToGroupJsonBody, +) -> Response[Any]: + """remove user to group + + Args: + workspace (str): + name (str): + json_body (RemoveUserToGroupJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + name=name, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/group/update_group.py b/python-client/windmill-api/windmill_api/api/group/update_group.py new file mode 100644 index 0000000000..4ef37c81ad --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/group/update_group.py @@ -0,0 +1,104 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.update_group_json_body import UpdateGroupJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + name: str, + *, + client: Client, + json_body: UpdateGroupJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/groups/update/{name}".format(client.base_url, workspace=workspace, name=name) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + name: str, + *, + client: Client, + json_body: UpdateGroupJsonBody, +) -> Response[Any]: + """update group + + Args: + workspace (str): + name (str): + json_body (UpdateGroupJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + name=name, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + name: str, + *, + client: Client, + json_body: UpdateGroupJsonBody, +) -> Response[Any]: + """update group + + Args: + workspace (str): + name (str): + json_body (UpdateGroupJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + name=name, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/job/__init__.py b/python-client/windmill-api/windmill_api/api/job/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/python-client/windmill-api/windmill_api/api/job/cancel_queued_job.py b/python-client/windmill-api/windmill_api/api/job/cancel_queued_job.py new file mode 100644 index 0000000000..c0da45c425 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/job/cancel_queued_job.py @@ -0,0 +1,104 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.cancel_queued_job_json_body import CancelQueuedJobJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + id: str, + *, + client: Client, + json_body: CancelQueuedJobJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/jobs/queue/cancel/{id}".format(client.base_url, workspace=workspace, id=id) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + id: str, + *, + client: Client, + json_body: CancelQueuedJobJsonBody, +) -> Response[Any]: + """cancel queued job + + Args: + workspace (str): + id (str): + json_body (CancelQueuedJobJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + id=id, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + id: str, + *, + client: Client, + json_body: CancelQueuedJobJsonBody, +) -> Response[Any]: + """cancel queued job + + Args: + workspace (str): + id (str): + json_body (CancelQueuedJobJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + id=id, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/job/cancel_suspended_job.py b/python-client/windmill-api/windmill_api/api/job/cancel_suspended_job.py new file mode 100644 index 0000000000..d61bffa8a6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/job/cancel_suspended_job.py @@ -0,0 +1,104 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.cancel_suspended_job_json_body import CancelSuspendedJobJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + id: str, + *, + client: Client, + json_body: CancelSuspendedJobJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/jobs/cancel/{id}".format(client.base_url, workspace=workspace, id=id) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + id: str, + *, + client: Client, + json_body: CancelSuspendedJobJsonBody, +) -> Response[Any]: + """cancel a job for a suspended flow + + Args: + workspace (str): + id (str): + json_body (CancelSuspendedJobJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + id=id, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + id: str, + *, + client: Client, + json_body: CancelSuspendedJobJsonBody, +) -> Response[Any]: + """cancel a job for a suspended flow + + Args: + workspace (str): + id (str): + json_body (CancelSuspendedJobJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + id=id, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/job/delete_completed_job.py b/python-client/windmill-api/windmill_api/api/job/delete_completed_job.py new file mode 100644 index 0000000000..d0555d17a5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/job/delete_completed_job.py @@ -0,0 +1,150 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.delete_completed_job_response_200 import DeleteCompletedJobResponse200 +from ...types import Response + + +def _get_kwargs( + workspace: str, + id: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/jobs/completed/delete/{id}".format(client.base_url, workspace=workspace, id=id) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[DeleteCompletedJobResponse200]: + if response.status_code == 200: + response_200 = DeleteCompletedJobResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[DeleteCompletedJobResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + id: str, + *, + client: Client, +) -> Response[DeleteCompletedJobResponse200]: + """delete completed job (erase content but keep run id) + + Args: + workspace (str): + id (str): + + Returns: + Response[DeleteCompletedJobResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + id=id, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + id: str, + *, + client: Client, +) -> Optional[DeleteCompletedJobResponse200]: + """delete completed job (erase content but keep run id) + + Args: + workspace (str): + id (str): + + Returns: + Response[DeleteCompletedJobResponse200] + """ + + return sync_detailed( + workspace=workspace, + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + id: str, + *, + client: Client, +) -> Response[DeleteCompletedJobResponse200]: + """delete completed job (erase content but keep run id) + + Args: + workspace (str): + id (str): + + Returns: + Response[DeleteCompletedJobResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + id=id, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + id: str, + *, + client: Client, +) -> Optional[DeleteCompletedJobResponse200]: + """delete completed job (erase content but keep run id) + + Args: + workspace (str): + id (str): + + Returns: + Response[DeleteCompletedJobResponse200] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + id=id, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/job/get_completed_job.py b/python-client/windmill-api/windmill_api/api/job/get_completed_job.py new file mode 100644 index 0000000000..e2d8c06703 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/job/get_completed_job.py @@ -0,0 +1,150 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.get_completed_job_response_200 import GetCompletedJobResponse200 +from ...types import Response + + +def _get_kwargs( + workspace: str, + id: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/jobs/completed/get/{id}".format(client.base_url, workspace=workspace, id=id) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[GetCompletedJobResponse200]: + if response.status_code == 200: + response_200 = GetCompletedJobResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[GetCompletedJobResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + id: str, + *, + client: Client, +) -> Response[GetCompletedJobResponse200]: + """get completed job + + Args: + workspace (str): + id (str): + + Returns: + Response[GetCompletedJobResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + id=id, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + id: str, + *, + client: Client, +) -> Optional[GetCompletedJobResponse200]: + """get completed job + + Args: + workspace (str): + id (str): + + Returns: + Response[GetCompletedJobResponse200] + """ + + return sync_detailed( + workspace=workspace, + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + id: str, + *, + client: Client, +) -> Response[GetCompletedJobResponse200]: + """get completed job + + Args: + workspace (str): + id (str): + + Returns: + Response[GetCompletedJobResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + id=id, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + id: str, + *, + client: Client, +) -> Optional[GetCompletedJobResponse200]: + """get completed job + + Args: + workspace (str): + id (str): + + Returns: + Response[GetCompletedJobResponse200] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + id=id, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/job/get_job.py b/python-client/windmill-api/windmill_api/api/job/get_job.py new file mode 100644 index 0000000000..548078bfa0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/job/get_job.py @@ -0,0 +1,150 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.get_job_response_200 import GetJobResponse200 +from ...types import Response + + +def _get_kwargs( + workspace: str, + id: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/jobs/get/{id}".format(client.base_url, workspace=workspace, id=id) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[GetJobResponse200]: + if response.status_code == 200: + response_200 = GetJobResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[GetJobResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + id: str, + *, + client: Client, +) -> Response[GetJobResponse200]: + """get job + + Args: + workspace (str): + id (str): + + Returns: + Response[GetJobResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + id=id, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + id: str, + *, + client: Client, +) -> Optional[GetJobResponse200]: + """get job + + Args: + workspace (str): + id (str): + + Returns: + Response[GetJobResponse200] + """ + + return sync_detailed( + workspace=workspace, + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + id: str, + *, + client: Client, +) -> Response[GetJobResponse200]: + """get job + + Args: + workspace (str): + id (str): + + Returns: + Response[GetJobResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + id=id, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + id: str, + *, + client: Client, +) -> Optional[GetJobResponse200]: + """get job + + Args: + workspace (str): + id (str): + + Returns: + Response[GetJobResponse200] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + id=id, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/job/get_job_updates.py b/python-client/windmill-api/windmill_api/api/job/get_job_updates.py new file mode 100644 index 0000000000..d6fb1a15e4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/job/get_job_updates.py @@ -0,0 +1,184 @@ +from typing import Any, Dict, Optional, Union + +import httpx + +from ...client import Client +from ...models.get_job_updates_response_200 import GetJobUpdatesResponse200 +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workspace: str, + id: str, + *, + client: Client, + running: Union[Unset, None, bool] = UNSET, + log_offset: Union[Unset, None, float] = UNSET, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/jobs/getupdate/{id}".format(client.base_url, workspace=workspace, id=id) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + params: Dict[str, Any] = {} + params["running"] = running + + params["log_offset"] = log_offset + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "params": params, + } + + +def _parse_response(*, response: httpx.Response) -> Optional[GetJobUpdatesResponse200]: + if response.status_code == 200: + response_200 = GetJobUpdatesResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[GetJobUpdatesResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + id: str, + *, + client: Client, + running: Union[Unset, None, bool] = UNSET, + log_offset: Union[Unset, None, float] = UNSET, +) -> Response[GetJobUpdatesResponse200]: + """get job updates + + Args: + workspace (str): + id (str): + running (Union[Unset, None, bool]): + log_offset (Union[Unset, None, float]): + + Returns: + Response[GetJobUpdatesResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + id=id, + client=client, + running=running, + log_offset=log_offset, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + id: str, + *, + client: Client, + running: Union[Unset, None, bool] = UNSET, + log_offset: Union[Unset, None, float] = UNSET, +) -> Optional[GetJobUpdatesResponse200]: + """get job updates + + Args: + workspace (str): + id (str): + running (Union[Unset, None, bool]): + log_offset (Union[Unset, None, float]): + + Returns: + Response[GetJobUpdatesResponse200] + """ + + return sync_detailed( + workspace=workspace, + id=id, + client=client, + running=running, + log_offset=log_offset, + ).parsed + + +async def asyncio_detailed( + workspace: str, + id: str, + *, + client: Client, + running: Union[Unset, None, bool] = UNSET, + log_offset: Union[Unset, None, float] = UNSET, +) -> Response[GetJobUpdatesResponse200]: + """get job updates + + Args: + workspace (str): + id (str): + running (Union[Unset, None, bool]): + log_offset (Union[Unset, None, float]): + + Returns: + Response[GetJobUpdatesResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + id=id, + client=client, + running=running, + log_offset=log_offset, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + id: str, + *, + client: Client, + running: Union[Unset, None, bool] = UNSET, + log_offset: Union[Unset, None, float] = UNSET, +) -> Optional[GetJobUpdatesResponse200]: + """get job updates + + Args: + workspace (str): + id (str): + running (Union[Unset, None, bool]): + log_offset (Union[Unset, None, float]): + + Returns: + Response[GetJobUpdatesResponse200] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + id=id, + client=client, + running=running, + log_offset=log_offset, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/job/list_completed_jobs.py b/python-client/windmill-api/windmill_api/api/job/list_completed_jobs.py new file mode 100644 index 0000000000..20dae3e826 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/job/list_completed_jobs.py @@ -0,0 +1,335 @@ +import datetime +from typing import Any, Dict, List, Optional, Union + +import httpx + +from ...client import Client +from ...models.list_completed_jobs_response_200_item import ListCompletedJobsResponse200Item +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workspace: str, + *, + client: Client, + order_desc: Union[Unset, None, bool] = UNSET, + created_by: Union[Unset, None, str] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, + script_path_exact: Union[Unset, None, str] = UNSET, + script_path_start: Union[Unset, None, str] = UNSET, + script_hash: Union[Unset, None, str] = UNSET, + created_before: Union[Unset, None, datetime.datetime] = UNSET, + created_after: Union[Unset, None, datetime.datetime] = UNSET, + success: Union[Unset, None, bool] = UNSET, + job_kinds: Union[Unset, None, str] = UNSET, + is_skipped: Union[Unset, None, bool] = UNSET, + is_flow_step: Union[Unset, None, bool] = UNSET, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/jobs/completed/list".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + params: Dict[str, Any] = {} + params["order_desc"] = order_desc + + params["created_by"] = created_by + + params["parent_job"] = parent_job + + params["script_path_exact"] = script_path_exact + + params["script_path_start"] = script_path_start + + params["script_hash"] = script_hash + + json_created_before: Union[Unset, None, str] = UNSET + if not isinstance(created_before, Unset): + json_created_before = created_before.isoformat() if created_before else None + + params["created_before"] = json_created_before + + json_created_after: Union[Unset, None, str] = UNSET + if not isinstance(created_after, Unset): + json_created_after = created_after.isoformat() if created_after else None + + params["created_after"] = json_created_after + + params["success"] = success + + params["job_kinds"] = job_kinds + + params["is_skipped"] = is_skipped + + params["is_flow_step"] = is_flow_step + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "params": params, + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[ListCompletedJobsResponse200Item]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = ListCompletedJobsResponse200Item.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[ListCompletedJobsResponse200Item]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + order_desc: Union[Unset, None, bool] = UNSET, + created_by: Union[Unset, None, str] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, + script_path_exact: Union[Unset, None, str] = UNSET, + script_path_start: Union[Unset, None, str] = UNSET, + script_hash: Union[Unset, None, str] = UNSET, + created_before: Union[Unset, None, datetime.datetime] = UNSET, + created_after: Union[Unset, None, datetime.datetime] = UNSET, + success: Union[Unset, None, bool] = UNSET, + job_kinds: Union[Unset, None, str] = UNSET, + is_skipped: Union[Unset, None, bool] = UNSET, + is_flow_step: Union[Unset, None, bool] = UNSET, +) -> Response[List[ListCompletedJobsResponse200Item]]: + """list all available completed jobs + + Args: + workspace (str): + order_desc (Union[Unset, None, bool]): + created_by (Union[Unset, None, str]): + parent_job (Union[Unset, None, str]): + script_path_exact (Union[Unset, None, str]): + script_path_start (Union[Unset, None, str]): + script_hash (Union[Unset, None, str]): + created_before (Union[Unset, None, datetime.datetime]): + created_after (Union[Unset, None, datetime.datetime]): + success (Union[Unset, None, bool]): + job_kinds (Union[Unset, None, str]): + is_skipped (Union[Unset, None, bool]): + is_flow_step (Union[Unset, None, bool]): + + Returns: + Response[List[ListCompletedJobsResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + order_desc=order_desc, + created_by=created_by, + parent_job=parent_job, + script_path_exact=script_path_exact, + script_path_start=script_path_start, + script_hash=script_hash, + created_before=created_before, + created_after=created_after, + success=success, + job_kinds=job_kinds, + is_skipped=is_skipped, + is_flow_step=is_flow_step, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + *, + client: Client, + order_desc: Union[Unset, None, bool] = UNSET, + created_by: Union[Unset, None, str] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, + script_path_exact: Union[Unset, None, str] = UNSET, + script_path_start: Union[Unset, None, str] = UNSET, + script_hash: Union[Unset, None, str] = UNSET, + created_before: Union[Unset, None, datetime.datetime] = UNSET, + created_after: Union[Unset, None, datetime.datetime] = UNSET, + success: Union[Unset, None, bool] = UNSET, + job_kinds: Union[Unset, None, str] = UNSET, + is_skipped: Union[Unset, None, bool] = UNSET, + is_flow_step: Union[Unset, None, bool] = UNSET, +) -> Optional[List[ListCompletedJobsResponse200Item]]: + """list all available completed jobs + + Args: + workspace (str): + order_desc (Union[Unset, None, bool]): + created_by (Union[Unset, None, str]): + parent_job (Union[Unset, None, str]): + script_path_exact (Union[Unset, None, str]): + script_path_start (Union[Unset, None, str]): + script_hash (Union[Unset, None, str]): + created_before (Union[Unset, None, datetime.datetime]): + created_after (Union[Unset, None, datetime.datetime]): + success (Union[Unset, None, bool]): + job_kinds (Union[Unset, None, str]): + is_skipped (Union[Unset, None, bool]): + is_flow_step (Union[Unset, None, bool]): + + Returns: + Response[List[ListCompletedJobsResponse200Item]] + """ + + return sync_detailed( + workspace=workspace, + client=client, + order_desc=order_desc, + created_by=created_by, + parent_job=parent_job, + script_path_exact=script_path_exact, + script_path_start=script_path_start, + script_hash=script_hash, + created_before=created_before, + created_after=created_after, + success=success, + job_kinds=job_kinds, + is_skipped=is_skipped, + is_flow_step=is_flow_step, + ).parsed + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + order_desc: Union[Unset, None, bool] = UNSET, + created_by: Union[Unset, None, str] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, + script_path_exact: Union[Unset, None, str] = UNSET, + script_path_start: Union[Unset, None, str] = UNSET, + script_hash: Union[Unset, None, str] = UNSET, + created_before: Union[Unset, None, datetime.datetime] = UNSET, + created_after: Union[Unset, None, datetime.datetime] = UNSET, + success: Union[Unset, None, bool] = UNSET, + job_kinds: Union[Unset, None, str] = UNSET, + is_skipped: Union[Unset, None, bool] = UNSET, + is_flow_step: Union[Unset, None, bool] = UNSET, +) -> Response[List[ListCompletedJobsResponse200Item]]: + """list all available completed jobs + + Args: + workspace (str): + order_desc (Union[Unset, None, bool]): + created_by (Union[Unset, None, str]): + parent_job (Union[Unset, None, str]): + script_path_exact (Union[Unset, None, str]): + script_path_start (Union[Unset, None, str]): + script_hash (Union[Unset, None, str]): + created_before (Union[Unset, None, datetime.datetime]): + created_after (Union[Unset, None, datetime.datetime]): + success (Union[Unset, None, bool]): + job_kinds (Union[Unset, None, str]): + is_skipped (Union[Unset, None, bool]): + is_flow_step (Union[Unset, None, bool]): + + Returns: + Response[List[ListCompletedJobsResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + order_desc=order_desc, + created_by=created_by, + parent_job=parent_job, + script_path_exact=script_path_exact, + script_path_start=script_path_start, + script_hash=script_hash, + created_before=created_before, + created_after=created_after, + success=success, + job_kinds=job_kinds, + is_skipped=is_skipped, + is_flow_step=is_flow_step, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + *, + client: Client, + order_desc: Union[Unset, None, bool] = UNSET, + created_by: Union[Unset, None, str] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, + script_path_exact: Union[Unset, None, str] = UNSET, + script_path_start: Union[Unset, None, str] = UNSET, + script_hash: Union[Unset, None, str] = UNSET, + created_before: Union[Unset, None, datetime.datetime] = UNSET, + created_after: Union[Unset, None, datetime.datetime] = UNSET, + success: Union[Unset, None, bool] = UNSET, + job_kinds: Union[Unset, None, str] = UNSET, + is_skipped: Union[Unset, None, bool] = UNSET, + is_flow_step: Union[Unset, None, bool] = UNSET, +) -> Optional[List[ListCompletedJobsResponse200Item]]: + """list all available completed jobs + + Args: + workspace (str): + order_desc (Union[Unset, None, bool]): + created_by (Union[Unset, None, str]): + parent_job (Union[Unset, None, str]): + script_path_exact (Union[Unset, None, str]): + script_path_start (Union[Unset, None, str]): + script_hash (Union[Unset, None, str]): + created_before (Union[Unset, None, datetime.datetime]): + created_after (Union[Unset, None, datetime.datetime]): + success (Union[Unset, None, bool]): + job_kinds (Union[Unset, None, str]): + is_skipped (Union[Unset, None, bool]): + is_flow_step (Union[Unset, None, bool]): + + Returns: + Response[List[ListCompletedJobsResponse200Item]] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + client=client, + order_desc=order_desc, + created_by=created_by, + parent_job=parent_job, + script_path_exact=script_path_exact, + script_path_start=script_path_start, + script_hash=script_hash, + created_before=created_before, + created_after=created_after, + success=success, + job_kinds=job_kinds, + is_skipped=is_skipped, + is_flow_step=is_flow_step, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/job/list_jobs.py b/python-client/windmill-api/windmill_api/api/job/list_jobs.py new file mode 100644 index 0000000000..69551e9e99 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/job/list_jobs.py @@ -0,0 +1,320 @@ +import datetime +from typing import Any, Dict, List, Optional, Union + +import httpx + +from ...client import Client +from ...models.list_jobs_response_200_item import ListJobsResponse200Item +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workspace: str, + *, + client: Client, + created_by: Union[Unset, None, str] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, + script_path_exact: Union[Unset, None, str] = UNSET, + script_path_start: Union[Unset, None, str] = UNSET, + script_hash: Union[Unset, None, str] = UNSET, + created_before: Union[Unset, None, datetime.datetime] = UNSET, + created_after: Union[Unset, None, datetime.datetime] = UNSET, + job_kinds: Union[Unset, None, str] = UNSET, + is_skipped: Union[Unset, None, bool] = UNSET, + is_flow_step: Union[Unset, None, bool] = UNSET, + success: Union[Unset, None, bool] = UNSET, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/jobs/list".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + params: Dict[str, Any] = {} + params["created_by"] = created_by + + params["parent_job"] = parent_job + + params["script_path_exact"] = script_path_exact + + params["script_path_start"] = script_path_start + + params["script_hash"] = script_hash + + json_created_before: Union[Unset, None, str] = UNSET + if not isinstance(created_before, Unset): + json_created_before = created_before.isoformat() if created_before else None + + params["created_before"] = json_created_before + + json_created_after: Union[Unset, None, str] = UNSET + if not isinstance(created_after, Unset): + json_created_after = created_after.isoformat() if created_after else None + + params["created_after"] = json_created_after + + params["job_kinds"] = job_kinds + + params["is_skipped"] = is_skipped + + params["is_flow_step"] = is_flow_step + + params["success"] = success + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "params": params, + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[ListJobsResponse200Item]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = ListJobsResponse200Item.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[ListJobsResponse200Item]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + created_by: Union[Unset, None, str] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, + script_path_exact: Union[Unset, None, str] = UNSET, + script_path_start: Union[Unset, None, str] = UNSET, + script_hash: Union[Unset, None, str] = UNSET, + created_before: Union[Unset, None, datetime.datetime] = UNSET, + created_after: Union[Unset, None, datetime.datetime] = UNSET, + job_kinds: Union[Unset, None, str] = UNSET, + is_skipped: Union[Unset, None, bool] = UNSET, + is_flow_step: Union[Unset, None, bool] = UNSET, + success: Union[Unset, None, bool] = UNSET, +) -> Response[List[ListJobsResponse200Item]]: + """list all available jobs + + Args: + workspace (str): + created_by (Union[Unset, None, str]): + parent_job (Union[Unset, None, str]): + script_path_exact (Union[Unset, None, str]): + script_path_start (Union[Unset, None, str]): + script_hash (Union[Unset, None, str]): + created_before (Union[Unset, None, datetime.datetime]): + created_after (Union[Unset, None, datetime.datetime]): + job_kinds (Union[Unset, None, str]): + is_skipped (Union[Unset, None, bool]): + is_flow_step (Union[Unset, None, bool]): + success (Union[Unset, None, bool]): + + Returns: + Response[List[ListJobsResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + created_by=created_by, + parent_job=parent_job, + script_path_exact=script_path_exact, + script_path_start=script_path_start, + script_hash=script_hash, + created_before=created_before, + created_after=created_after, + job_kinds=job_kinds, + is_skipped=is_skipped, + is_flow_step=is_flow_step, + success=success, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + *, + client: Client, + created_by: Union[Unset, None, str] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, + script_path_exact: Union[Unset, None, str] = UNSET, + script_path_start: Union[Unset, None, str] = UNSET, + script_hash: Union[Unset, None, str] = UNSET, + created_before: Union[Unset, None, datetime.datetime] = UNSET, + created_after: Union[Unset, None, datetime.datetime] = UNSET, + job_kinds: Union[Unset, None, str] = UNSET, + is_skipped: Union[Unset, None, bool] = UNSET, + is_flow_step: Union[Unset, None, bool] = UNSET, + success: Union[Unset, None, bool] = UNSET, +) -> Optional[List[ListJobsResponse200Item]]: + """list all available jobs + + Args: + workspace (str): + created_by (Union[Unset, None, str]): + parent_job (Union[Unset, None, str]): + script_path_exact (Union[Unset, None, str]): + script_path_start (Union[Unset, None, str]): + script_hash (Union[Unset, None, str]): + created_before (Union[Unset, None, datetime.datetime]): + created_after (Union[Unset, None, datetime.datetime]): + job_kinds (Union[Unset, None, str]): + is_skipped (Union[Unset, None, bool]): + is_flow_step (Union[Unset, None, bool]): + success (Union[Unset, None, bool]): + + Returns: + Response[List[ListJobsResponse200Item]] + """ + + return sync_detailed( + workspace=workspace, + client=client, + created_by=created_by, + parent_job=parent_job, + script_path_exact=script_path_exact, + script_path_start=script_path_start, + script_hash=script_hash, + created_before=created_before, + created_after=created_after, + job_kinds=job_kinds, + is_skipped=is_skipped, + is_flow_step=is_flow_step, + success=success, + ).parsed + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + created_by: Union[Unset, None, str] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, + script_path_exact: Union[Unset, None, str] = UNSET, + script_path_start: Union[Unset, None, str] = UNSET, + script_hash: Union[Unset, None, str] = UNSET, + created_before: Union[Unset, None, datetime.datetime] = UNSET, + created_after: Union[Unset, None, datetime.datetime] = UNSET, + job_kinds: Union[Unset, None, str] = UNSET, + is_skipped: Union[Unset, None, bool] = UNSET, + is_flow_step: Union[Unset, None, bool] = UNSET, + success: Union[Unset, None, bool] = UNSET, +) -> Response[List[ListJobsResponse200Item]]: + """list all available jobs + + Args: + workspace (str): + created_by (Union[Unset, None, str]): + parent_job (Union[Unset, None, str]): + script_path_exact (Union[Unset, None, str]): + script_path_start (Union[Unset, None, str]): + script_hash (Union[Unset, None, str]): + created_before (Union[Unset, None, datetime.datetime]): + created_after (Union[Unset, None, datetime.datetime]): + job_kinds (Union[Unset, None, str]): + is_skipped (Union[Unset, None, bool]): + is_flow_step (Union[Unset, None, bool]): + success (Union[Unset, None, bool]): + + Returns: + Response[List[ListJobsResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + created_by=created_by, + parent_job=parent_job, + script_path_exact=script_path_exact, + script_path_start=script_path_start, + script_hash=script_hash, + created_before=created_before, + created_after=created_after, + job_kinds=job_kinds, + is_skipped=is_skipped, + is_flow_step=is_flow_step, + success=success, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + *, + client: Client, + created_by: Union[Unset, None, str] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, + script_path_exact: Union[Unset, None, str] = UNSET, + script_path_start: Union[Unset, None, str] = UNSET, + script_hash: Union[Unset, None, str] = UNSET, + created_before: Union[Unset, None, datetime.datetime] = UNSET, + created_after: Union[Unset, None, datetime.datetime] = UNSET, + job_kinds: Union[Unset, None, str] = UNSET, + is_skipped: Union[Unset, None, bool] = UNSET, + is_flow_step: Union[Unset, None, bool] = UNSET, + success: Union[Unset, None, bool] = UNSET, +) -> Optional[List[ListJobsResponse200Item]]: + """list all available jobs + + Args: + workspace (str): + created_by (Union[Unset, None, str]): + parent_job (Union[Unset, None, str]): + script_path_exact (Union[Unset, None, str]): + script_path_start (Union[Unset, None, str]): + script_hash (Union[Unset, None, str]): + created_before (Union[Unset, None, datetime.datetime]): + created_after (Union[Unset, None, datetime.datetime]): + job_kinds (Union[Unset, None, str]): + is_skipped (Union[Unset, None, bool]): + is_flow_step (Union[Unset, None, bool]): + success (Union[Unset, None, bool]): + + Returns: + Response[List[ListJobsResponse200Item]] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + client=client, + created_by=created_by, + parent_job=parent_job, + script_path_exact=script_path_exact, + script_path_start=script_path_start, + script_hash=script_hash, + created_before=created_before, + created_after=created_after, + job_kinds=job_kinds, + is_skipped=is_skipped, + is_flow_step=is_flow_step, + success=success, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/job/list_queue.py b/python-client/windmill-api/windmill_api/api/job/list_queue.py new file mode 100644 index 0000000000..6e2846244e --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/job/list_queue.py @@ -0,0 +1,305 @@ +import datetime +from typing import Any, Dict, List, Optional, Union + +import httpx + +from ...client import Client +from ...models.list_queue_response_200_item import ListQueueResponse200Item +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workspace: str, + *, + client: Client, + order_desc: Union[Unset, None, bool] = UNSET, + created_by: Union[Unset, None, str] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, + script_path_exact: Union[Unset, None, str] = UNSET, + script_path_start: Union[Unset, None, str] = UNSET, + script_hash: Union[Unset, None, str] = UNSET, + created_before: Union[Unset, None, datetime.datetime] = UNSET, + created_after: Union[Unset, None, datetime.datetime] = UNSET, + success: Union[Unset, None, bool] = UNSET, + job_kinds: Union[Unset, None, str] = UNSET, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/jobs/queue/list".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + params: Dict[str, Any] = {} + params["order_desc"] = order_desc + + params["created_by"] = created_by + + params["parent_job"] = parent_job + + params["script_path_exact"] = script_path_exact + + params["script_path_start"] = script_path_start + + params["script_hash"] = script_hash + + json_created_before: Union[Unset, None, str] = UNSET + if not isinstance(created_before, Unset): + json_created_before = created_before.isoformat() if created_before else None + + params["created_before"] = json_created_before + + json_created_after: Union[Unset, None, str] = UNSET + if not isinstance(created_after, Unset): + json_created_after = created_after.isoformat() if created_after else None + + params["created_after"] = json_created_after + + params["success"] = success + + params["job_kinds"] = job_kinds + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "params": params, + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[ListQueueResponse200Item]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = ListQueueResponse200Item.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[ListQueueResponse200Item]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + order_desc: Union[Unset, None, bool] = UNSET, + created_by: Union[Unset, None, str] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, + script_path_exact: Union[Unset, None, str] = UNSET, + script_path_start: Union[Unset, None, str] = UNSET, + script_hash: Union[Unset, None, str] = UNSET, + created_before: Union[Unset, None, datetime.datetime] = UNSET, + created_after: Union[Unset, None, datetime.datetime] = UNSET, + success: Union[Unset, None, bool] = UNSET, + job_kinds: Union[Unset, None, str] = UNSET, +) -> Response[List[ListQueueResponse200Item]]: + """list all available queued jobs + + Args: + workspace (str): + order_desc (Union[Unset, None, bool]): + created_by (Union[Unset, None, str]): + parent_job (Union[Unset, None, str]): + script_path_exact (Union[Unset, None, str]): + script_path_start (Union[Unset, None, str]): + script_hash (Union[Unset, None, str]): + created_before (Union[Unset, None, datetime.datetime]): + created_after (Union[Unset, None, datetime.datetime]): + success (Union[Unset, None, bool]): + job_kinds (Union[Unset, None, str]): + + Returns: + Response[List[ListQueueResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + order_desc=order_desc, + created_by=created_by, + parent_job=parent_job, + script_path_exact=script_path_exact, + script_path_start=script_path_start, + script_hash=script_hash, + created_before=created_before, + created_after=created_after, + success=success, + job_kinds=job_kinds, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + *, + client: Client, + order_desc: Union[Unset, None, bool] = UNSET, + created_by: Union[Unset, None, str] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, + script_path_exact: Union[Unset, None, str] = UNSET, + script_path_start: Union[Unset, None, str] = UNSET, + script_hash: Union[Unset, None, str] = UNSET, + created_before: Union[Unset, None, datetime.datetime] = UNSET, + created_after: Union[Unset, None, datetime.datetime] = UNSET, + success: Union[Unset, None, bool] = UNSET, + job_kinds: Union[Unset, None, str] = UNSET, +) -> Optional[List[ListQueueResponse200Item]]: + """list all available queued jobs + + Args: + workspace (str): + order_desc (Union[Unset, None, bool]): + created_by (Union[Unset, None, str]): + parent_job (Union[Unset, None, str]): + script_path_exact (Union[Unset, None, str]): + script_path_start (Union[Unset, None, str]): + script_hash (Union[Unset, None, str]): + created_before (Union[Unset, None, datetime.datetime]): + created_after (Union[Unset, None, datetime.datetime]): + success (Union[Unset, None, bool]): + job_kinds (Union[Unset, None, str]): + + Returns: + Response[List[ListQueueResponse200Item]] + """ + + return sync_detailed( + workspace=workspace, + client=client, + order_desc=order_desc, + created_by=created_by, + parent_job=parent_job, + script_path_exact=script_path_exact, + script_path_start=script_path_start, + script_hash=script_hash, + created_before=created_before, + created_after=created_after, + success=success, + job_kinds=job_kinds, + ).parsed + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + order_desc: Union[Unset, None, bool] = UNSET, + created_by: Union[Unset, None, str] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, + script_path_exact: Union[Unset, None, str] = UNSET, + script_path_start: Union[Unset, None, str] = UNSET, + script_hash: Union[Unset, None, str] = UNSET, + created_before: Union[Unset, None, datetime.datetime] = UNSET, + created_after: Union[Unset, None, datetime.datetime] = UNSET, + success: Union[Unset, None, bool] = UNSET, + job_kinds: Union[Unset, None, str] = UNSET, +) -> Response[List[ListQueueResponse200Item]]: + """list all available queued jobs + + Args: + workspace (str): + order_desc (Union[Unset, None, bool]): + created_by (Union[Unset, None, str]): + parent_job (Union[Unset, None, str]): + script_path_exact (Union[Unset, None, str]): + script_path_start (Union[Unset, None, str]): + script_hash (Union[Unset, None, str]): + created_before (Union[Unset, None, datetime.datetime]): + created_after (Union[Unset, None, datetime.datetime]): + success (Union[Unset, None, bool]): + job_kinds (Union[Unset, None, str]): + + Returns: + Response[List[ListQueueResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + order_desc=order_desc, + created_by=created_by, + parent_job=parent_job, + script_path_exact=script_path_exact, + script_path_start=script_path_start, + script_hash=script_hash, + created_before=created_before, + created_after=created_after, + success=success, + job_kinds=job_kinds, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + *, + client: Client, + order_desc: Union[Unset, None, bool] = UNSET, + created_by: Union[Unset, None, str] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, + script_path_exact: Union[Unset, None, str] = UNSET, + script_path_start: Union[Unset, None, str] = UNSET, + script_hash: Union[Unset, None, str] = UNSET, + created_before: Union[Unset, None, datetime.datetime] = UNSET, + created_after: Union[Unset, None, datetime.datetime] = UNSET, + success: Union[Unset, None, bool] = UNSET, + job_kinds: Union[Unset, None, str] = UNSET, +) -> Optional[List[ListQueueResponse200Item]]: + """list all available queued jobs + + Args: + workspace (str): + order_desc (Union[Unset, None, bool]): + created_by (Union[Unset, None, str]): + parent_job (Union[Unset, None, str]): + script_path_exact (Union[Unset, None, str]): + script_path_start (Union[Unset, None, str]): + script_hash (Union[Unset, None, str]): + created_before (Union[Unset, None, datetime.datetime]): + created_after (Union[Unset, None, datetime.datetime]): + success (Union[Unset, None, bool]): + job_kinds (Union[Unset, None, str]): + + Returns: + Response[List[ListQueueResponse200Item]] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + client=client, + order_desc=order_desc, + created_by=created_by, + parent_job=parent_job, + script_path_exact=script_path_exact, + script_path_start=script_path_start, + script_hash=script_hash, + created_before=created_before, + created_after=created_after, + success=success, + job_kinds=job_kinds, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/job/resume_suspended_job.py b/python-client/windmill-api/windmill_api/api/job/resume_suspended_job.py new file mode 100644 index 0000000000..55da913547 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/job/resume_suspended_job.py @@ -0,0 +1,104 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.resume_suspended_job_json_body import ResumeSuspendedJobJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + id: str, + *, + client: Client, + json_body: ResumeSuspendedJobJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/jobs/resume/{id}".format(client.base_url, workspace=workspace, id=id) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + id: str, + *, + client: Client, + json_body: ResumeSuspendedJobJsonBody, +) -> Response[Any]: + """resume a job for a suspended flow + + Args: + workspace (str): + id (str): + json_body (ResumeSuspendedJobJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + id=id, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + id: str, + *, + client: Client, + json_body: ResumeSuspendedJobJsonBody, +) -> Response[Any]: + """resume a job for a suspended flow + + Args: + workspace (str): + id (str): + json_body (ResumeSuspendedJobJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + id=id, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/job/run_flow_by_path.py b/python-client/windmill-api/windmill_api/api/job/run_flow_by_path.py new file mode 100644 index 0000000000..b7371e4d64 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/job/run_flow_by_path.py @@ -0,0 +1,140 @@ +import datetime +from typing import Any, Dict, Union + +import httpx + +from ...client import Client +from ...models.run_flow_by_path_json_body import RunFlowByPathJsonBody +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, + json_body: RunFlowByPathJsonBody, + scheduled_for: Union[Unset, None, datetime.datetime] = UNSET, + scheduled_in_secs: Union[Unset, None, float] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/jobs/run/f/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + params: Dict[str, Any] = {} + json_scheduled_for: Union[Unset, None, str] = UNSET + if not isinstance(scheduled_for, Unset): + json_scheduled_for = scheduled_for.isoformat() if scheduled_for else None + + params["scheduled_for"] = json_scheduled_for + + params["scheduled_in_secs"] = scheduled_in_secs + + params["parent_job"] = parent_job + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + "params": params, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, + json_body: RunFlowByPathJsonBody, + scheduled_for: Union[Unset, None, datetime.datetime] = UNSET, + scheduled_in_secs: Union[Unset, None, float] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """run flow by path + + Args: + workspace (str): + path (str): + scheduled_for (Union[Unset, None, datetime.datetime]): + scheduled_in_secs (Union[Unset, None, float]): + parent_job (Union[Unset, None, str]): + json_body (RunFlowByPathJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + json_body=json_body, + scheduled_for=scheduled_for, + scheduled_in_secs=scheduled_in_secs, + parent_job=parent_job, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, + json_body: RunFlowByPathJsonBody, + scheduled_for: Union[Unset, None, datetime.datetime] = UNSET, + scheduled_in_secs: Union[Unset, None, float] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """run flow by path + + Args: + workspace (str): + path (str): + scheduled_for (Union[Unset, None, datetime.datetime]): + scheduled_in_secs (Union[Unset, None, float]): + parent_job (Union[Unset, None, str]): + json_body (RunFlowByPathJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + json_body=json_body, + scheduled_for=scheduled_for, + scheduled_in_secs=scheduled_in_secs, + parent_job=parent_job, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/job/run_flow_preview.py b/python-client/windmill-api/windmill_api/api/job/run_flow_preview.py new file mode 100644 index 0000000000..eef71adbf1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/job/run_flow_preview.py @@ -0,0 +1,97 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.run_flow_preview_json_body import RunFlowPreviewJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, + json_body: RunFlowPreviewJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/jobs/run/preview_flow".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + json_body: RunFlowPreviewJsonBody, +) -> Response[Any]: + """run flow preview + + Args: + workspace (str): + json_body (RunFlowPreviewJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + json_body: RunFlowPreviewJsonBody, +) -> Response[Any]: + """run flow preview + + Args: + workspace (str): + json_body (RunFlowPreviewJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/job/run_script_by_hash.py b/python-client/windmill-api/windmill_api/api/job/run_script_by_hash.py new file mode 100644 index 0000000000..235a195d15 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/job/run_script_by_hash.py @@ -0,0 +1,140 @@ +import datetime +from typing import Any, Dict, Union + +import httpx + +from ...client import Client +from ...models.run_script_by_hash_json_body import RunScriptByHashJsonBody +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workspace: str, + hash_: str, + *, + client: Client, + json_body: RunScriptByHashJsonBody, + scheduled_for: Union[Unset, None, datetime.datetime] = UNSET, + scheduled_in_secs: Union[Unset, None, float] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/jobs/run/h/{hash}".format(client.base_url, workspace=workspace, hash=hash_) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + params: Dict[str, Any] = {} + json_scheduled_for: Union[Unset, None, str] = UNSET + if not isinstance(scheduled_for, Unset): + json_scheduled_for = scheduled_for.isoformat() if scheduled_for else None + + params["scheduled_for"] = json_scheduled_for + + params["scheduled_in_secs"] = scheduled_in_secs + + params["parent_job"] = parent_job + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + "params": params, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + hash_: str, + *, + client: Client, + json_body: RunScriptByHashJsonBody, + scheduled_for: Union[Unset, None, datetime.datetime] = UNSET, + scheduled_in_secs: Union[Unset, None, float] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """run script by hash + + Args: + workspace (str): + hash_ (str): + scheduled_for (Union[Unset, None, datetime.datetime]): + scheduled_in_secs (Union[Unset, None, float]): + parent_job (Union[Unset, None, str]): + json_body (RunScriptByHashJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + hash_=hash_, + client=client, + json_body=json_body, + scheduled_for=scheduled_for, + scheduled_in_secs=scheduled_in_secs, + parent_job=parent_job, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + hash_: str, + *, + client: Client, + json_body: RunScriptByHashJsonBody, + scheduled_for: Union[Unset, None, datetime.datetime] = UNSET, + scheduled_in_secs: Union[Unset, None, float] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """run script by hash + + Args: + workspace (str): + hash_ (str): + scheduled_for (Union[Unset, None, datetime.datetime]): + scheduled_in_secs (Union[Unset, None, float]): + parent_job (Union[Unset, None, str]): + json_body (RunScriptByHashJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + hash_=hash_, + client=client, + json_body=json_body, + scheduled_for=scheduled_for, + scheduled_in_secs=scheduled_in_secs, + parent_job=parent_job, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/job/run_script_by_path.py b/python-client/windmill-api/windmill_api/api/job/run_script_by_path.py new file mode 100644 index 0000000000..080ca9dfc7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/job/run_script_by_path.py @@ -0,0 +1,140 @@ +import datetime +from typing import Any, Dict, Union + +import httpx + +from ...client import Client +from ...models.run_script_by_path_json_body import RunScriptByPathJsonBody +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, + json_body: RunScriptByPathJsonBody, + scheduled_for: Union[Unset, None, datetime.datetime] = UNSET, + scheduled_in_secs: Union[Unset, None, float] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/jobs/run/p/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + params: Dict[str, Any] = {} + json_scheduled_for: Union[Unset, None, str] = UNSET + if not isinstance(scheduled_for, Unset): + json_scheduled_for = scheduled_for.isoformat() if scheduled_for else None + + params["scheduled_for"] = json_scheduled_for + + params["scheduled_in_secs"] = scheduled_in_secs + + params["parent_job"] = parent_job + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + "params": params, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, + json_body: RunScriptByPathJsonBody, + scheduled_for: Union[Unset, None, datetime.datetime] = UNSET, + scheduled_in_secs: Union[Unset, None, float] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """run script by path + + Args: + workspace (str): + path (str): + scheduled_for (Union[Unset, None, datetime.datetime]): + scheduled_in_secs (Union[Unset, None, float]): + parent_job (Union[Unset, None, str]): + json_body (RunScriptByPathJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + json_body=json_body, + scheduled_for=scheduled_for, + scheduled_in_secs=scheduled_in_secs, + parent_job=parent_job, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, + json_body: RunScriptByPathJsonBody, + scheduled_for: Union[Unset, None, datetime.datetime] = UNSET, + scheduled_in_secs: Union[Unset, None, float] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """run script by path + + Args: + workspace (str): + path (str): + scheduled_for (Union[Unset, None, datetime.datetime]): + scheduled_in_secs (Union[Unset, None, float]): + parent_job (Union[Unset, None, str]): + json_body (RunScriptByPathJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + json_body=json_body, + scheduled_for=scheduled_for, + scheduled_in_secs=scheduled_in_secs, + parent_job=parent_job, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/job/run_script_preview.py b/python-client/windmill-api/windmill_api/api/job/run_script_preview.py new file mode 100644 index 0000000000..891e425ae7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/job/run_script_preview.py @@ -0,0 +1,97 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.run_script_preview_json_body import RunScriptPreviewJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, + json_body: RunScriptPreviewJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/jobs/run/preview".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + json_body: RunScriptPreviewJsonBody, +) -> Response[Any]: + """run script preview + + Args: + workspace (str): + json_body (RunScriptPreviewJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + json_body: RunScriptPreviewJsonBody, +) -> Response[Any]: + """run script preview + + Args: + workspace (str): + json_body (RunScriptPreviewJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/job/run_wait_result_script_by_path.py b/python-client/windmill-api/windmill_api/api/job/run_wait_result_script_by_path.py new file mode 100644 index 0000000000..0b609584a3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/job/run_wait_result_script_by_path.py @@ -0,0 +1,140 @@ +import datetime +from typing import Any, Dict, Union + +import httpx + +from ...client import Client +from ...models.run_wait_result_script_by_path_json_body import RunWaitResultScriptByPathJsonBody +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, + json_body: RunWaitResultScriptByPathJsonBody, + scheduled_for: Union[Unset, None, datetime.datetime] = UNSET, + scheduled_in_secs: Union[Unset, None, float] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/jobs/run_wait_result/p/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + params: Dict[str, Any] = {} + json_scheduled_for: Union[Unset, None, str] = UNSET + if not isinstance(scheduled_for, Unset): + json_scheduled_for = scheduled_for.isoformat() if scheduled_for else None + + params["scheduled_for"] = json_scheduled_for + + params["scheduled_in_secs"] = scheduled_in_secs + + params["parent_job"] = parent_job + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + "params": params, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, + json_body: RunWaitResultScriptByPathJsonBody, + scheduled_for: Union[Unset, None, datetime.datetime] = UNSET, + scheduled_in_secs: Union[Unset, None, float] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """run script by path + + Args: + workspace (str): + path (str): + scheduled_for (Union[Unset, None, datetime.datetime]): + scheduled_in_secs (Union[Unset, None, float]): + parent_job (Union[Unset, None, str]): + json_body (RunWaitResultScriptByPathJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + json_body=json_body, + scheduled_for=scheduled_for, + scheduled_in_secs=scheduled_in_secs, + parent_job=parent_job, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, + json_body: RunWaitResultScriptByPathJsonBody, + scheduled_for: Union[Unset, None, datetime.datetime] = UNSET, + scheduled_in_secs: Union[Unset, None, float] = UNSET, + parent_job: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """run script by path + + Args: + workspace (str): + path (str): + scheduled_for (Union[Unset, None, datetime.datetime]): + scheduled_in_secs (Union[Unset, None, float]): + parent_job (Union[Unset, None, str]): + json_body (RunWaitResultScriptByPathJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + json_body=json_body, + scheduled_for=scheduled_for, + scheduled_in_secs=scheduled_in_secs, + parent_job=parent_job, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/oauth/__init__.py b/python-client/windmill-api/windmill_api/api/oauth/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/python-client/windmill-api/windmill_api/api/oauth/connect_callback.py b/python-client/windmill-api/windmill_api/api/oauth/connect_callback.py new file mode 100644 index 0000000000..4fd4de9838 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/oauth/connect_callback.py @@ -0,0 +1,154 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.connect_callback_json_body import ConnectCallbackJsonBody +from ...models.connect_callback_response_200 import ConnectCallbackResponse200 +from ...types import Response + + +def _get_kwargs( + client_name: str, + *, + client: Client, + json_body: ConnectCallbackJsonBody, +) -> Dict[str, Any]: + url = "{}/oauth/connect_callback/{client_name}".format(client.base_url, client_name=client_name) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _parse_response(*, response: httpx.Response) -> Optional[ConnectCallbackResponse200]: + if response.status_code == 200: + response_200 = ConnectCallbackResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[ConnectCallbackResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + client_name: str, + *, + client: Client, + json_body: ConnectCallbackJsonBody, +) -> Response[ConnectCallbackResponse200]: + """connect callback + + Args: + client_name (str): + json_body (ConnectCallbackJsonBody): + + Returns: + Response[ConnectCallbackResponse200] + """ + + kwargs = _get_kwargs( + client_name=client_name, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + client_name: str, + *, + client: Client, + json_body: ConnectCallbackJsonBody, +) -> Optional[ConnectCallbackResponse200]: + """connect callback + + Args: + client_name (str): + json_body (ConnectCallbackJsonBody): + + Returns: + Response[ConnectCallbackResponse200] + """ + + return sync_detailed( + client_name=client_name, + client=client, + json_body=json_body, + ).parsed + + +async def asyncio_detailed( + client_name: str, + *, + client: Client, + json_body: ConnectCallbackJsonBody, +) -> Response[ConnectCallbackResponse200]: + """connect callback + + Args: + client_name (str): + json_body (ConnectCallbackJsonBody): + + Returns: + Response[ConnectCallbackResponse200] + """ + + kwargs = _get_kwargs( + client_name=client_name, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + client_name: str, + *, + client: Client, + json_body: ConnectCallbackJsonBody, +) -> Optional[ConnectCallbackResponse200]: + """connect callback + + Args: + client_name (str): + json_body (ConnectCallbackJsonBody): + + Returns: + Response[ConnectCallbackResponse200] + """ + + return ( + await asyncio_detailed( + client_name=client_name, + client=client, + json_body=json_body, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/oauth/connect_slack_callback.py b/python-client/windmill-api/windmill_api/api/oauth/connect_slack_callback.py new file mode 100644 index 0000000000..16b3d426e0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/oauth/connect_slack_callback.py @@ -0,0 +1,141 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.connect_slack_callback_json_body import ConnectSlackCallbackJsonBody +from ...models.connect_slack_callback_response_200 import ConnectSlackCallbackResponse200 +from ...types import Response + + +def _get_kwargs( + *, + client: Client, + json_body: ConnectSlackCallbackJsonBody, +) -> Dict[str, Any]: + url = "{}/oauth/connect_slack_callback".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _parse_response(*, response: httpx.Response) -> Optional[ConnectSlackCallbackResponse200]: + if response.status_code == 200: + response_200 = ConnectSlackCallbackResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[ConnectSlackCallbackResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + *, + client: Client, + json_body: ConnectSlackCallbackJsonBody, +) -> Response[ConnectSlackCallbackResponse200]: + """connect slack callback + + Args: + json_body (ConnectSlackCallbackJsonBody): + + Returns: + Response[ConnectSlackCallbackResponse200] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + *, + client: Client, + json_body: ConnectSlackCallbackJsonBody, +) -> Optional[ConnectSlackCallbackResponse200]: + """connect slack callback + + Args: + json_body (ConnectSlackCallbackJsonBody): + + Returns: + Response[ConnectSlackCallbackResponse200] + """ + + return sync_detailed( + client=client, + json_body=json_body, + ).parsed + + +async def asyncio_detailed( + *, + client: Client, + json_body: ConnectSlackCallbackJsonBody, +) -> Response[ConnectSlackCallbackResponse200]: + """connect slack callback + + Args: + json_body (ConnectSlackCallbackJsonBody): + + Returns: + Response[ConnectSlackCallbackResponse200] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + *, + client: Client, + json_body: ConnectSlackCallbackJsonBody, +) -> Optional[ConnectSlackCallbackResponse200]: + """connect slack callback + + Args: + json_body (ConnectSlackCallbackJsonBody): + + Returns: + Response[ConnectSlackCallbackResponse200] + """ + + return ( + await asyncio_detailed( + client=client, + json_body=json_body, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/oauth/create_account.py b/python-client/windmill-api/windmill_api/api/oauth/create_account.py new file mode 100644 index 0000000000..34e1879488 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/oauth/create_account.py @@ -0,0 +1,97 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.create_account_json_body import CreateAccountJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, + json_body: CreateAccountJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/oauth/create_account".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + json_body: CreateAccountJsonBody, +) -> Response[Any]: + """create OAuth account + + Args: + workspace (str): + json_body (CreateAccountJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + json_body: CreateAccountJsonBody, +) -> Response[Any]: + """create OAuth account + + Args: + workspace (str): + json_body (CreateAccountJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/oauth/disconnect_account.py b/python-client/windmill-api/windmill_api/api/oauth/disconnect_account.py new file mode 100644 index 0000000000..8594900f72 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/oauth/disconnect_account.py @@ -0,0 +1,93 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + workspace: str, + id: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/oauth/disconnect/{id}".format(client.base_url, workspace=workspace, id=id) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + id: str, + *, + client: Client, +) -> Response[Any]: + """disconnect account + + Args: + workspace (str): + id (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + id=id, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + id: str, + *, + client: Client, +) -> Response[Any]: + """disconnect account + + Args: + workspace (str): + id (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + id=id, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/oauth/disconnect_slack.py b/python-client/windmill-api/windmill_api/api/oauth/disconnect_slack.py new file mode 100644 index 0000000000..1c7110fe66 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/oauth/disconnect_slack.py @@ -0,0 +1,86 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/oauth/disconnect_slack".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, +) -> Response[Any]: + """disconnect slack + + Args: + workspace (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, +) -> Response[Any]: + """disconnect slack + + Args: + workspace (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/oauth/list_o_auth_connects.py b/python-client/windmill-api/windmill_api/api/oauth/list_o_auth_connects.py new file mode 100644 index 0000000000..00155c550a --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/oauth/list_o_auth_connects.py @@ -0,0 +1,75 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/oauth/list_connects".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + *, + client: Client, +) -> Response[Any]: + """list oauth connects + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + *, + client: Client, +) -> Response[Any]: + """list oauth connects + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/oauth/list_o_auth_logins.py b/python-client/windmill-api/windmill_api/api/oauth/list_o_auth_logins.py new file mode 100644 index 0000000000..0c64050dc1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/oauth/list_o_auth_logins.py @@ -0,0 +1,115 @@ +from typing import Any, Dict, List, Optional, cast + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/oauth/list_logins".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[str]]: + if response.status_code == 200: + response_200 = cast(List[str], response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[str]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + *, + client: Client, +) -> Response[List[str]]: + """list oauth logins + + Returns: + Response[List[str]] + """ + + kwargs = _get_kwargs( + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + *, + client: Client, +) -> Optional[List[str]]: + """list oauth logins + + Returns: + Response[List[str]] + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: Client, +) -> Response[List[str]]: + """list oauth logins + + Returns: + Response[List[str]] + """ + + kwargs = _get_kwargs( + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + *, + client: Client, +) -> Optional[List[str]]: + """list oauth logins + + Returns: + Response[List[str]] + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/oauth/refresh_token.py b/python-client/windmill-api/windmill_api/api/oauth/refresh_token.py new file mode 100644 index 0000000000..5a487ed35e --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/oauth/refresh_token.py @@ -0,0 +1,104 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.refresh_token_json_body import RefreshTokenJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + id: str, + *, + client: Client, + json_body: RefreshTokenJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/oauth/refresh_token/{id}".format(client.base_url, workspace=workspace, id=id) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + id: str, + *, + client: Client, + json_body: RefreshTokenJsonBody, +) -> Response[Any]: + """refresh token + + Args: + workspace (str): + id (str): + json_body (RefreshTokenJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + id=id, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + id: str, + *, + client: Client, + json_body: RefreshTokenJsonBody, +) -> Response[Any]: + """refresh token + + Args: + workspace (str): + id (str): + json_body (RefreshTokenJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + id=id, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/oauth/set_workspace_slack.py b/python-client/windmill-api/windmill_api/api/oauth/set_workspace_slack.py new file mode 100644 index 0000000000..c7a817c5eb --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/oauth/set_workspace_slack.py @@ -0,0 +1,97 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.set_workspace_slack_json_body import SetWorkspaceSlackJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, + json_body: SetWorkspaceSlackJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/oauth/set_workspace_slack".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + json_body: SetWorkspaceSlackJsonBody, +) -> Response[Any]: + """set workspace's slack + + Args: + workspace (str): + json_body (SetWorkspaceSlackJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + json_body: SetWorkspaceSlackJsonBody, +) -> Response[Any]: + """set workspace's slack + + Args: + workspace (str): + json_body (SetWorkspaceSlackJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/resource/__init__.py b/python-client/windmill-api/windmill_api/api/resource/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/python-client/windmill-api/windmill_api/api/resource/create_resource.py b/python-client/windmill-api/windmill_api/api/resource/create_resource.py new file mode 100644 index 0000000000..c661cb9fc6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/resource/create_resource.py @@ -0,0 +1,97 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.create_resource_json_body import CreateResourceJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, + json_body: CreateResourceJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/resources/create".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + json_body: CreateResourceJsonBody, +) -> Response[Any]: + """create resource + + Args: + workspace (str): + json_body (CreateResourceJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + json_body: CreateResourceJsonBody, +) -> Response[Any]: + """create resource + + Args: + workspace (str): + json_body (CreateResourceJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/resource/create_resource_type.py b/python-client/windmill-api/windmill_api/api/resource/create_resource_type.py new file mode 100644 index 0000000000..111548df68 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/resource/create_resource_type.py @@ -0,0 +1,97 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.create_resource_type_json_body import CreateResourceTypeJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, + json_body: CreateResourceTypeJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/resources/type/create".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + json_body: CreateResourceTypeJsonBody, +) -> Response[Any]: + """create resource_type + + Args: + workspace (str): + json_body (CreateResourceTypeJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + json_body: CreateResourceTypeJsonBody, +) -> Response[Any]: + """create resource_type + + Args: + workspace (str): + json_body (CreateResourceTypeJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/resource/delete_resource.py b/python-client/windmill-api/windmill_api/api/resource/delete_resource.py new file mode 100644 index 0000000000..d49af3381f --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/resource/delete_resource.py @@ -0,0 +1,93 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/resources/delete/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "delete", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[Any]: + """delete resource + + Args: + workspace (str): + path (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[Any]: + """delete resource + + Args: + workspace (str): + path (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/resource/delete_resource_type.py b/python-client/windmill-api/windmill_api/api/resource/delete_resource_type.py new file mode 100644 index 0000000000..c8e2a377ee --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/resource/delete_resource_type.py @@ -0,0 +1,93 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/resources/type/delete/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "delete", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[Any]: + """delete resource_type + + Args: + workspace (str): + path (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[Any]: + """delete resource_type + + Args: + workspace (str): + path (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/resource/exists_resource.py b/python-client/windmill-api/windmill_api/api/resource/exists_resource.py new file mode 100644 index 0000000000..068382c5b5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/resource/exists_resource.py @@ -0,0 +1,148 @@ +from typing import Any, Dict, Optional, cast + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/resources/exists/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[bool]: + if response.status_code == 200: + response_200 = cast(bool, response.json()) + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[bool]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[bool]: + """does resource exists + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + path: str, + *, + client: Client, +) -> Optional[bool]: + """does resource exists + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + return sync_detailed( + workspace=workspace, + path=path, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[bool]: + """does resource exists + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + path: str, + *, + client: Client, +) -> Optional[bool]: + """does resource exists + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + path=path, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/resource/exists_resource_type.py b/python-client/windmill-api/windmill_api/api/resource/exists_resource_type.py new file mode 100644 index 0000000000..21a2922cd9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/resource/exists_resource_type.py @@ -0,0 +1,148 @@ +from typing import Any, Dict, Optional, cast + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/resources/type/exists/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[bool]: + if response.status_code == 200: + response_200 = cast(bool, response.json()) + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[bool]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[bool]: + """does resource_type exists + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + path: str, + *, + client: Client, +) -> Optional[bool]: + """does resource_type exists + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + return sync_detailed( + workspace=workspace, + path=path, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[bool]: + """does resource_type exists + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + path: str, + *, + client: Client, +) -> Optional[bool]: + """does resource_type exists + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + path=path, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/resource/get_resource.py b/python-client/windmill-api/windmill_api/api/resource/get_resource.py new file mode 100644 index 0000000000..155e2150f8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/resource/get_resource.py @@ -0,0 +1,150 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.get_resource_response_200 import GetResourceResponse200 +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/resources/get/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[GetResourceResponse200]: + if response.status_code == 200: + response_200 = GetResourceResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[GetResourceResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[GetResourceResponse200]: + """get resource + + Args: + workspace (str): + path (str): + + Returns: + Response[GetResourceResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + path: str, + *, + client: Client, +) -> Optional[GetResourceResponse200]: + """get resource + + Args: + workspace (str): + path (str): + + Returns: + Response[GetResourceResponse200] + """ + + return sync_detailed( + workspace=workspace, + path=path, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[GetResourceResponse200]: + """get resource + + Args: + workspace (str): + path (str): + + Returns: + Response[GetResourceResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + path: str, + *, + client: Client, +) -> Optional[GetResourceResponse200]: + """get resource + + Args: + workspace (str): + path (str): + + Returns: + Response[GetResourceResponse200] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + path=path, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/resource/get_resource_type.py b/python-client/windmill-api/windmill_api/api/resource/get_resource_type.py new file mode 100644 index 0000000000..318daebe3d --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/resource/get_resource_type.py @@ -0,0 +1,150 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.get_resource_type_response_200 import GetResourceTypeResponse200 +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/resources/type/get/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[GetResourceTypeResponse200]: + if response.status_code == 200: + response_200 = GetResourceTypeResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[GetResourceTypeResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[GetResourceTypeResponse200]: + """get resource_type + + Args: + workspace (str): + path (str): + + Returns: + Response[GetResourceTypeResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + path: str, + *, + client: Client, +) -> Optional[GetResourceTypeResponse200]: + """get resource_type + + Args: + workspace (str): + path (str): + + Returns: + Response[GetResourceTypeResponse200] + """ + + return sync_detailed( + workspace=workspace, + path=path, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[GetResourceTypeResponse200]: + """get resource_type + + Args: + workspace (str): + path (str): + + Returns: + Response[GetResourceTypeResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + path: str, + *, + client: Client, +) -> Optional[GetResourceTypeResponse200]: + """get resource_type + + Args: + workspace (str): + path (str): + + Returns: + Response[GetResourceTypeResponse200] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + path=path, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/resource/list_resource.py b/python-client/windmill-api/windmill_api/api/resource/list_resource.py new file mode 100644 index 0000000000..634f4cfca4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/resource/list_resource.py @@ -0,0 +1,191 @@ +from typing import Any, Dict, List, Optional, Union + +import httpx + +from ...client import Client +from ...models.list_resource_response_200_item import ListResourceResponse200Item +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, + resource_type: Union[Unset, None, str] = UNSET, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/resources/list".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + params: Dict[str, Any] = {} + params["page"] = page + + params["per_page"] = per_page + + params["resource_type"] = resource_type + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "params": params, + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[ListResourceResponse200Item]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = ListResourceResponse200Item.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[ListResourceResponse200Item]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, + resource_type: Union[Unset, None, str] = UNSET, +) -> Response[List[ListResourceResponse200Item]]: + """list resources + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + resource_type (Union[Unset, None, str]): + + Returns: + Response[List[ListResourceResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + resource_type=resource_type, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, + resource_type: Union[Unset, None, str] = UNSET, +) -> Optional[List[ListResourceResponse200Item]]: + """list resources + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + resource_type (Union[Unset, None, str]): + + Returns: + Response[List[ListResourceResponse200Item]] + """ + + return sync_detailed( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + resource_type=resource_type, + ).parsed + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, + resource_type: Union[Unset, None, str] = UNSET, +) -> Response[List[ListResourceResponse200Item]]: + """list resources + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + resource_type (Union[Unset, None, str]): + + Returns: + Response[List[ListResourceResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + resource_type=resource_type, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, + resource_type: Union[Unset, None, str] = UNSET, +) -> Optional[List[ListResourceResponse200Item]]: + """list resources + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + resource_type (Union[Unset, None, str]): + + Returns: + Response[List[ListResourceResponse200Item]] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + resource_type=resource_type, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/resource/list_resource_type.py b/python-client/windmill-api/windmill_api/api/resource/list_resource_type.py new file mode 100644 index 0000000000..9152cf42cd --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/resource/list_resource_type.py @@ -0,0 +1,142 @@ +from typing import Any, Dict, List, Optional + +import httpx + +from ...client import Client +from ...models.list_resource_type_response_200_item import ListResourceTypeResponse200Item +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/resources/type/list".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[ListResourceTypeResponse200Item]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = ListResourceTypeResponse200Item.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[ListResourceTypeResponse200Item]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, +) -> Response[List[ListResourceTypeResponse200Item]]: + """list resource_types + + Args: + workspace (str): + + Returns: + Response[List[ListResourceTypeResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + *, + client: Client, +) -> Optional[List[ListResourceTypeResponse200Item]]: + """list resource_types + + Args: + workspace (str): + + Returns: + Response[List[ListResourceTypeResponse200Item]] + """ + + return sync_detailed( + workspace=workspace, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, +) -> Response[List[ListResourceTypeResponse200Item]]: + """list resource_types + + Args: + workspace (str): + + Returns: + Response[List[ListResourceTypeResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + *, + client: Client, +) -> Optional[List[ListResourceTypeResponse200Item]]: + """list resource_types + + Args: + workspace (str): + + Returns: + Response[List[ListResourceTypeResponse200Item]] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/resource/list_resource_type_names.py b/python-client/windmill-api/windmill_api/api/resource/list_resource_type_names.py new file mode 100644 index 0000000000..4751e62c4b --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/resource/list_resource_type_names.py @@ -0,0 +1,136 @@ +from typing import Any, Dict, List, Optional, cast + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/resources/type/listnames".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[str]]: + if response.status_code == 200: + response_200 = cast(List[str], response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[str]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, +) -> Response[List[str]]: + """list resource_types names + + Args: + workspace (str): + + Returns: + Response[List[str]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + *, + client: Client, +) -> Optional[List[str]]: + """list resource_types names + + Args: + workspace (str): + + Returns: + Response[List[str]] + """ + + return sync_detailed( + workspace=workspace, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, +) -> Response[List[str]]: + """list resource_types names + + Args: + workspace (str): + + Returns: + Response[List[str]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + *, + client: Client, +) -> Optional[List[str]]: + """list resource_types names + + Args: + workspace (str): + + Returns: + Response[List[str]] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/resource/update_resource.py b/python-client/windmill-api/windmill_api/api/resource/update_resource.py new file mode 100644 index 0000000000..c3579c557c --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/resource/update_resource.py @@ -0,0 +1,104 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.update_resource_json_body import UpdateResourceJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, + json_body: UpdateResourceJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/resources/update/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, + json_body: UpdateResourceJsonBody, +) -> Response[Any]: + """update resource + + Args: + workspace (str): + path (str): + json_body (UpdateResourceJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, + json_body: UpdateResourceJsonBody, +) -> Response[Any]: + """update resource + + Args: + workspace (str): + path (str): + json_body (UpdateResourceJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/resource/update_resource_type.py b/python-client/windmill-api/windmill_api/api/resource/update_resource_type.py new file mode 100644 index 0000000000..f516bf56d7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/resource/update_resource_type.py @@ -0,0 +1,104 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.update_resource_type_json_body import UpdateResourceTypeJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, + json_body: UpdateResourceTypeJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/resources/type/update/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, + json_body: UpdateResourceTypeJsonBody, +) -> Response[Any]: + """update resource_type + + Args: + workspace (str): + path (str): + json_body (UpdateResourceTypeJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, + json_body: UpdateResourceTypeJsonBody, +) -> Response[Any]: + """update resource_type + + Args: + workspace (str): + path (str): + json_body (UpdateResourceTypeJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/schedule/__init__.py b/python-client/windmill-api/windmill_api/api/schedule/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/python-client/windmill-api/windmill_api/api/schedule/create_schedule.py b/python-client/windmill-api/windmill_api/api/schedule/create_schedule.py new file mode 100644 index 0000000000..d50b43f2f5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/schedule/create_schedule.py @@ -0,0 +1,97 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.create_schedule_json_body import CreateScheduleJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, + json_body: CreateScheduleJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/schedules/create".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + json_body: CreateScheduleJsonBody, +) -> Response[Any]: + """create schedule + + Args: + workspace (str): + json_body (CreateScheduleJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + json_body: CreateScheduleJsonBody, +) -> Response[Any]: + """create schedule + + Args: + workspace (str): + json_body (CreateScheduleJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/schedule/delete_schedule.py b/python-client/windmill-api/windmill_api/api/schedule/delete_schedule.py new file mode 100644 index 0000000000..fe9e05e912 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/schedule/delete_schedule.py @@ -0,0 +1,93 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/schedules/delete/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "delete", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[Any]: + """delete schedule + + Args: + workspace (str): + path (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[Any]: + """delete schedule + + Args: + workspace (str): + path (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/schedule/exists_schedule.py b/python-client/windmill-api/windmill_api/api/schedule/exists_schedule.py new file mode 100644 index 0000000000..8025460323 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/schedule/exists_schedule.py @@ -0,0 +1,148 @@ +from typing import Any, Dict, Optional, cast + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/schedules/exists/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[bool]: + if response.status_code == 200: + response_200 = cast(bool, response.json()) + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[bool]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[bool]: + """does schedule exists + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + path: str, + *, + client: Client, +) -> Optional[bool]: + """does schedule exists + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + return sync_detailed( + workspace=workspace, + path=path, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[bool]: + """does schedule exists + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + path: str, + *, + client: Client, +) -> Optional[bool]: + """does schedule exists + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + path=path, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/schedule/get_schedule.py b/python-client/windmill-api/windmill_api/api/schedule/get_schedule.py new file mode 100644 index 0000000000..37a794e0bc --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/schedule/get_schedule.py @@ -0,0 +1,150 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.get_schedule_response_200 import GetScheduleResponse200 +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/schedules/get/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[GetScheduleResponse200]: + if response.status_code == 200: + response_200 = GetScheduleResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[GetScheduleResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[GetScheduleResponse200]: + """get schedule + + Args: + workspace (str): + path (str): + + Returns: + Response[GetScheduleResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + path: str, + *, + client: Client, +) -> Optional[GetScheduleResponse200]: + """get schedule + + Args: + workspace (str): + path (str): + + Returns: + Response[GetScheduleResponse200] + """ + + return sync_detailed( + workspace=workspace, + path=path, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[GetScheduleResponse200]: + """get schedule + + Args: + workspace (str): + path (str): + + Returns: + Response[GetScheduleResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + path: str, + *, + client: Client, +) -> Optional[GetScheduleResponse200]: + """get schedule + + Args: + workspace (str): + path (str): + + Returns: + Response[GetScheduleResponse200] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + path=path, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/schedule/list_schedules.py b/python-client/windmill-api/windmill_api/api/schedule/list_schedules.py new file mode 100644 index 0000000000..0ad775d44c --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/schedule/list_schedules.py @@ -0,0 +1,176 @@ +from typing import Any, Dict, List, Optional, Union + +import httpx + +from ...client import Client +from ...models.list_schedules_response_200_item import ListSchedulesResponse200Item +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/schedules/list".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + params: Dict[str, Any] = {} + params["page"] = page + + params["per_page"] = per_page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "params": params, + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[ListSchedulesResponse200Item]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = ListSchedulesResponse200Item.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[ListSchedulesResponse200Item]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Response[List[ListSchedulesResponse200Item]]: + """list schedules + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + + Returns: + Response[List[ListSchedulesResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Optional[List[ListSchedulesResponse200Item]]: + """list schedules + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + + Returns: + Response[List[ListSchedulesResponse200Item]] + """ + + return sync_detailed( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + ).parsed + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Response[List[ListSchedulesResponse200Item]]: + """list schedules + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + + Returns: + Response[List[ListSchedulesResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Optional[List[ListSchedulesResponse200Item]]: + """list schedules + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + + Returns: + Response[List[ListSchedulesResponse200Item]] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/schedule/preview_schedule.py b/python-client/windmill-api/windmill_api/api/schedule/preview_schedule.py new file mode 100644 index 0000000000..742c1f45d5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/schedule/preview_schedule.py @@ -0,0 +1,147 @@ +import datetime +from typing import Any, Dict, List, Optional + +import httpx +from dateutil.parser import isoparse + +from ...client import Client +from ...models.preview_schedule_json_body import PreviewScheduleJsonBody +from ...types import Response + + +def _get_kwargs( + *, + client: Client, + json_body: PreviewScheduleJsonBody, +) -> Dict[str, Any]: + url = "{}/schedules/preview".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[datetime.datetime]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = isoparse(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[datetime.datetime]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + *, + client: Client, + json_body: PreviewScheduleJsonBody, +) -> Response[List[datetime.datetime]]: + """preview schedule + + Args: + json_body (PreviewScheduleJsonBody): + + Returns: + Response[List[datetime.datetime]] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + *, + client: Client, + json_body: PreviewScheduleJsonBody, +) -> Optional[List[datetime.datetime]]: + """preview schedule + + Args: + json_body (PreviewScheduleJsonBody): + + Returns: + Response[List[datetime.datetime]] + """ + + return sync_detailed( + client=client, + json_body=json_body, + ).parsed + + +async def asyncio_detailed( + *, + client: Client, + json_body: PreviewScheduleJsonBody, +) -> Response[List[datetime.datetime]]: + """preview schedule + + Args: + json_body (PreviewScheduleJsonBody): + + Returns: + Response[List[datetime.datetime]] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + *, + client: Client, + json_body: PreviewScheduleJsonBody, +) -> Optional[List[datetime.datetime]]: + """preview schedule + + Args: + json_body (PreviewScheduleJsonBody): + + Returns: + Response[List[datetime.datetime]] + """ + + return ( + await asyncio_detailed( + client=client, + json_body=json_body, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/schedule/set_schedule_enabled.py b/python-client/windmill-api/windmill_api/api/schedule/set_schedule_enabled.py new file mode 100644 index 0000000000..a2124c5b76 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/schedule/set_schedule_enabled.py @@ -0,0 +1,104 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.set_schedule_enabled_json_body import SetScheduleEnabledJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, + json_body: SetScheduleEnabledJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/schedules/setenabled/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, + json_body: SetScheduleEnabledJsonBody, +) -> Response[Any]: + """set enabled schedule + + Args: + workspace (str): + path (str): + json_body (SetScheduleEnabledJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, + json_body: SetScheduleEnabledJsonBody, +) -> Response[Any]: + """set enabled schedule + + Args: + workspace (str): + path (str): + json_body (SetScheduleEnabledJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/schedule/update_schedule.py b/python-client/windmill-api/windmill_api/api/schedule/update_schedule.py new file mode 100644 index 0000000000..c14dce629a --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/schedule/update_schedule.py @@ -0,0 +1,104 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.update_schedule_json_body import UpdateScheduleJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, + json_body: UpdateScheduleJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/schedules/update/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, + json_body: UpdateScheduleJsonBody, +) -> Response[Any]: + """update schedule + + Args: + workspace (str): + path (str): + json_body (UpdateScheduleJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, + json_body: UpdateScheduleJsonBody, +) -> Response[Any]: + """update schedule + + Args: + workspace (str): + path (str): + json_body (UpdateScheduleJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/script/__init__.py b/python-client/windmill-api/windmill_api/api/script/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/python-client/windmill-api/windmill_api/api/script/archive_script_by_hash.py b/python-client/windmill-api/windmill_api/api/script/archive_script_by_hash.py new file mode 100644 index 0000000000..f501e9a590 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/script/archive_script_by_hash.py @@ -0,0 +1,150 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.archive_script_by_hash_response_200 import ArchiveScriptByHashResponse200 +from ...types import Response + + +def _get_kwargs( + workspace: str, + hash_: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/scripts/archive/h/{hash}".format(client.base_url, workspace=workspace, hash=hash_) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[ArchiveScriptByHashResponse200]: + if response.status_code == 200: + response_200 = ArchiveScriptByHashResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[ArchiveScriptByHashResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + hash_: str, + *, + client: Client, +) -> Response[ArchiveScriptByHashResponse200]: + """archive script by hash + + Args: + workspace (str): + hash_ (str): + + Returns: + Response[ArchiveScriptByHashResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + hash_=hash_, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + hash_: str, + *, + client: Client, +) -> Optional[ArchiveScriptByHashResponse200]: + """archive script by hash + + Args: + workspace (str): + hash_ (str): + + Returns: + Response[ArchiveScriptByHashResponse200] + """ + + return sync_detailed( + workspace=workspace, + hash_=hash_, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + hash_: str, + *, + client: Client, +) -> Response[ArchiveScriptByHashResponse200]: + """archive script by hash + + Args: + workspace (str): + hash_ (str): + + Returns: + Response[ArchiveScriptByHashResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + hash_=hash_, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + hash_: str, + *, + client: Client, +) -> Optional[ArchiveScriptByHashResponse200]: + """archive script by hash + + Args: + workspace (str): + hash_ (str): + + Returns: + Response[ArchiveScriptByHashResponse200] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + hash_=hash_, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/script/archive_script_by_path.py b/python-client/windmill-api/windmill_api/api/script/archive_script_by_path.py new file mode 100644 index 0000000000..6fa5ece381 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/script/archive_script_by_path.py @@ -0,0 +1,93 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/scripts/archive/p/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[Any]: + """archive script by path + + Args: + workspace (str): + path (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[Any]: + """archive script by path + + Args: + workspace (str): + path (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/script/create_script.py b/python-client/windmill-api/windmill_api/api/script/create_script.py new file mode 100644 index 0000000000..8061195c18 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/script/create_script.py @@ -0,0 +1,97 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.create_script_json_body import CreateScriptJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, + json_body: CreateScriptJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/scripts/create".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + json_body: CreateScriptJsonBody, +) -> Response[Any]: + """create script + + Args: + workspace (str): + json_body (CreateScriptJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + json_body: CreateScriptJsonBody, +) -> Response[Any]: + """create script + + Args: + workspace (str): + json_body (CreateScriptJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/script/delete_script_by_hash.py b/python-client/windmill-api/windmill_api/api/script/delete_script_by_hash.py new file mode 100644 index 0000000000..c97f304f55 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/script/delete_script_by_hash.py @@ -0,0 +1,150 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.delete_script_by_hash_response_200 import DeleteScriptByHashResponse200 +from ...types import Response + + +def _get_kwargs( + workspace: str, + hash_: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/scripts/delete/h/{hash}".format(client.base_url, workspace=workspace, hash=hash_) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[DeleteScriptByHashResponse200]: + if response.status_code == 200: + response_200 = DeleteScriptByHashResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[DeleteScriptByHashResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + hash_: str, + *, + client: Client, +) -> Response[DeleteScriptByHashResponse200]: + """delete script by hash (erase content but keep hash) + + Args: + workspace (str): + hash_ (str): + + Returns: + Response[DeleteScriptByHashResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + hash_=hash_, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + hash_: str, + *, + client: Client, +) -> Optional[DeleteScriptByHashResponse200]: + """delete script by hash (erase content but keep hash) + + Args: + workspace (str): + hash_ (str): + + Returns: + Response[DeleteScriptByHashResponse200] + """ + + return sync_detailed( + workspace=workspace, + hash_=hash_, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + hash_: str, + *, + client: Client, +) -> Response[DeleteScriptByHashResponse200]: + """delete script by hash (erase content but keep hash) + + Args: + workspace (str): + hash_ (str): + + Returns: + Response[DeleteScriptByHashResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + hash_=hash_, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + hash_: str, + *, + client: Client, +) -> Optional[DeleteScriptByHashResponse200]: + """delete script by hash (erase content but keep hash) + + Args: + workspace (str): + hash_ (str): + + Returns: + Response[DeleteScriptByHashResponse200] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + hash_=hash_, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/script/deno_to_jsonschema.py b/python-client/windmill-api/windmill_api/api/script/deno_to_jsonschema.py new file mode 100644 index 0000000000..b6e3982736 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/script/deno_to_jsonschema.py @@ -0,0 +1,140 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.deno_to_jsonschema_response_200 import DenoToJsonschemaResponse200 +from ...types import Response + + +def _get_kwargs( + *, + client: Client, + json_body: str, +) -> Dict[str, Any]: + url = "{}/scripts/deno/tojsonschema".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _parse_response(*, response: httpx.Response) -> Optional[DenoToJsonschemaResponse200]: + if response.status_code == 200: + response_200 = DenoToJsonschemaResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[DenoToJsonschemaResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + *, + client: Client, + json_body: str, +) -> Response[DenoToJsonschemaResponse200]: + """inspect deno code to infer jsonschema of arguments + + Args: + json_body (str): + + Returns: + Response[DenoToJsonschemaResponse200] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + *, + client: Client, + json_body: str, +) -> Optional[DenoToJsonschemaResponse200]: + """inspect deno code to infer jsonschema of arguments + + Args: + json_body (str): + + Returns: + Response[DenoToJsonschemaResponse200] + """ + + return sync_detailed( + client=client, + json_body=json_body, + ).parsed + + +async def asyncio_detailed( + *, + client: Client, + json_body: str, +) -> Response[DenoToJsonschemaResponse200]: + """inspect deno code to infer jsonschema of arguments + + Args: + json_body (str): + + Returns: + Response[DenoToJsonschemaResponse200] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + *, + client: Client, + json_body: str, +) -> Optional[DenoToJsonschemaResponse200]: + """inspect deno code to infer jsonschema of arguments + + Args: + json_body (str): + + Returns: + Response[DenoToJsonschemaResponse200] + """ + + return ( + await asyncio_detailed( + client=client, + json_body=json_body, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/script/exists_script_by_path.py b/python-client/windmill-api/windmill_api/api/script/exists_script_by_path.py new file mode 100644 index 0000000000..f18e300159 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/script/exists_script_by_path.py @@ -0,0 +1,148 @@ +from typing import Any, Dict, Optional, cast + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/scripts/exists/p/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[bool]: + if response.status_code == 200: + response_200 = cast(bool, response.json()) + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[bool]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[bool]: + """exists script by path + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + path: str, + *, + client: Client, +) -> Optional[bool]: + """exists script by path + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + return sync_detailed( + workspace=workspace, + path=path, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[bool]: + """exists script by path + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + path: str, + *, + client: Client, +) -> Optional[bool]: + """exists script by path + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + path=path, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/script/get_hub_script_content_by_path.py b/python-client/windmill-api/windmill_api/api/script/get_hub_script_content_by_path.py new file mode 100644 index 0000000000..65fb33f4e6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/script/get_hub_script_content_by_path.py @@ -0,0 +1,86 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + path: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/scripts/hub/get/{path}".format(client.base_url, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + path: str, + *, + client: Client, +) -> Response[Any]: + """get hub script content by path + + Args: + path (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + path=path, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + path: str, + *, + client: Client, +) -> Response[Any]: + """get hub script content by path + + Args: + path (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + path=path, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/script/get_script_by_hash.py b/python-client/windmill-api/windmill_api/api/script/get_script_by_hash.py new file mode 100644 index 0000000000..886ede02fc --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/script/get_script_by_hash.py @@ -0,0 +1,150 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.get_script_by_hash_response_200 import GetScriptByHashResponse200 +from ...types import Response + + +def _get_kwargs( + workspace: str, + hash_: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/scripts/get/h/{hash}".format(client.base_url, workspace=workspace, hash=hash_) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[GetScriptByHashResponse200]: + if response.status_code == 200: + response_200 = GetScriptByHashResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[GetScriptByHashResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + hash_: str, + *, + client: Client, +) -> Response[GetScriptByHashResponse200]: + """get script by hash + + Args: + workspace (str): + hash_ (str): + + Returns: + Response[GetScriptByHashResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + hash_=hash_, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + hash_: str, + *, + client: Client, +) -> Optional[GetScriptByHashResponse200]: + """get script by hash + + Args: + workspace (str): + hash_ (str): + + Returns: + Response[GetScriptByHashResponse200] + """ + + return sync_detailed( + workspace=workspace, + hash_=hash_, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + hash_: str, + *, + client: Client, +) -> Response[GetScriptByHashResponse200]: + """get script by hash + + Args: + workspace (str): + hash_ (str): + + Returns: + Response[GetScriptByHashResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + hash_=hash_, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + hash_: str, + *, + client: Client, +) -> Optional[GetScriptByHashResponse200]: + """get script by hash + + Args: + workspace (str): + hash_ (str): + + Returns: + Response[GetScriptByHashResponse200] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + hash_=hash_, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/script/get_script_by_path.py b/python-client/windmill-api/windmill_api/api/script/get_script_by_path.py new file mode 100644 index 0000000000..208e5e8291 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/script/get_script_by_path.py @@ -0,0 +1,150 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.get_script_by_path_response_200 import GetScriptByPathResponse200 +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/scripts/get/p/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[GetScriptByPathResponse200]: + if response.status_code == 200: + response_200 = GetScriptByPathResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[GetScriptByPathResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[GetScriptByPathResponse200]: + """get script by path + + Args: + workspace (str): + path (str): + + Returns: + Response[GetScriptByPathResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + path: str, + *, + client: Client, +) -> Optional[GetScriptByPathResponse200]: + """get script by path + + Args: + workspace (str): + path (str): + + Returns: + Response[GetScriptByPathResponse200] + """ + + return sync_detailed( + workspace=workspace, + path=path, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[GetScriptByPathResponse200]: + """get script by path + + Args: + workspace (str): + path (str): + + Returns: + Response[GetScriptByPathResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + path: str, + *, + client: Client, +) -> Optional[GetScriptByPathResponse200]: + """get script by path + + Args: + workspace (str): + path (str): + + Returns: + Response[GetScriptByPathResponse200] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + path=path, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/script/get_script_deployment_status.py b/python-client/windmill-api/windmill_api/api/script/get_script_deployment_status.py new file mode 100644 index 0000000000..74cba82909 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/script/get_script_deployment_status.py @@ -0,0 +1,150 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.get_script_deployment_status_response_200 import GetScriptDeploymentStatusResponse200 +from ...types import Response + + +def _get_kwargs( + workspace: str, + hash_: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/scripts/deployment_status/h/{hash}".format(client.base_url, workspace=workspace, hash=hash_) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[GetScriptDeploymentStatusResponse200]: + if response.status_code == 200: + response_200 = GetScriptDeploymentStatusResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[GetScriptDeploymentStatusResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + hash_: str, + *, + client: Client, +) -> Response[GetScriptDeploymentStatusResponse200]: + """get script deployment status + + Args: + workspace (str): + hash_ (str): + + Returns: + Response[GetScriptDeploymentStatusResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + hash_=hash_, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + hash_: str, + *, + client: Client, +) -> Optional[GetScriptDeploymentStatusResponse200]: + """get script deployment status + + Args: + workspace (str): + hash_ (str): + + Returns: + Response[GetScriptDeploymentStatusResponse200] + """ + + return sync_detailed( + workspace=workspace, + hash_=hash_, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + hash_: str, + *, + client: Client, +) -> Response[GetScriptDeploymentStatusResponse200]: + """get script deployment status + + Args: + workspace (str): + hash_ (str): + + Returns: + Response[GetScriptDeploymentStatusResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + hash_=hash_, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + hash_: str, + *, + client: Client, +) -> Optional[GetScriptDeploymentStatusResponse200]: + """get script deployment status + + Args: + workspace (str): + hash_ (str): + + Returns: + Response[GetScriptDeploymentStatusResponse200] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + hash_=hash_, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/script/go_to_jsonschema.py b/python-client/windmill-api/windmill_api/api/script/go_to_jsonschema.py new file mode 100644 index 0000000000..65a416cb69 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/script/go_to_jsonschema.py @@ -0,0 +1,140 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.go_to_jsonschema_response_200 import GoToJsonschemaResponse200 +from ...types import Response + + +def _get_kwargs( + *, + client: Client, + json_body: str, +) -> Dict[str, Any]: + url = "{}/scripts/go/tojsonschema".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _parse_response(*, response: httpx.Response) -> Optional[GoToJsonschemaResponse200]: + if response.status_code == 200: + response_200 = GoToJsonschemaResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[GoToJsonschemaResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + *, + client: Client, + json_body: str, +) -> Response[GoToJsonschemaResponse200]: + """inspect go code to infer jsonschema of arguments + + Args: + json_body (str): + + Returns: + Response[GoToJsonschemaResponse200] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + *, + client: Client, + json_body: str, +) -> Optional[GoToJsonschemaResponse200]: + """inspect go code to infer jsonschema of arguments + + Args: + json_body (str): + + Returns: + Response[GoToJsonschemaResponse200] + """ + + return sync_detailed( + client=client, + json_body=json_body, + ).parsed + + +async def asyncio_detailed( + *, + client: Client, + json_body: str, +) -> Response[GoToJsonschemaResponse200]: + """inspect go code to infer jsonschema of arguments + + Args: + json_body (str): + + Returns: + Response[GoToJsonschemaResponse200] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + *, + client: Client, + json_body: str, +) -> Optional[GoToJsonschemaResponse200]: + """inspect go code to infer jsonschema of arguments + + Args: + json_body (str): + + Returns: + Response[GoToJsonschemaResponse200] + """ + + return ( + await asyncio_detailed( + client=client, + json_body=json_body, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/script/list_hub_scripts.py b/python-client/windmill-api/windmill_api/api/script/list_hub_scripts.py new file mode 100644 index 0000000000..a60919fff8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/script/list_hub_scripts.py @@ -0,0 +1,116 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.list_hub_scripts_response_200 import ListHubScriptsResponse200 +from ...types import Response + + +def _get_kwargs( + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/scripts/hub/list".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[ListHubScriptsResponse200]: + if response.status_code == 200: + response_200 = ListHubScriptsResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[ListHubScriptsResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + *, + client: Client, +) -> Response[ListHubScriptsResponse200]: + """list all available hub scripts + + Returns: + Response[ListHubScriptsResponse200] + """ + + kwargs = _get_kwargs( + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + *, + client: Client, +) -> Optional[ListHubScriptsResponse200]: + """list all available hub scripts + + Returns: + Response[ListHubScriptsResponse200] + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: Client, +) -> Response[ListHubScriptsResponse200]: + """list all available hub scripts + + Returns: + Response[ListHubScriptsResponse200] + """ + + kwargs = _get_kwargs( + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + *, + client: Client, +) -> Optional[ListHubScriptsResponse200]: + """list all available hub scripts + + Returns: + Response[ListHubScriptsResponse200] + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/script/list_scripts.py b/python-client/windmill-api/windmill_api/api/script/list_scripts.py new file mode 100644 index 0000000000..e6df299935 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/script/list_scripts.py @@ -0,0 +1,326 @@ +from typing import Any, Dict, List, Optional, Union + +import httpx + +from ...client import Client +from ...models.list_scripts_response_200_item import ListScriptsResponse200Item +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, + order_desc: Union[Unset, None, bool] = UNSET, + created_by: Union[Unset, None, str] = UNSET, + path_start: Union[Unset, None, str] = UNSET, + path_exact: Union[Unset, None, str] = UNSET, + first_parent_hash: Union[Unset, None, str] = UNSET, + last_parent_hash: Union[Unset, None, str] = UNSET, + parent_hash: Union[Unset, None, str] = UNSET, + show_archived: Union[Unset, None, bool] = UNSET, + is_template: Union[Unset, None, bool] = UNSET, + kind: Union[Unset, None, str] = UNSET, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/scripts/list".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + params: Dict[str, Any] = {} + params["page"] = page + + params["per_page"] = per_page + + params["order_desc"] = order_desc + + params["created_by"] = created_by + + params["path_start"] = path_start + + params["path_exact"] = path_exact + + params["first_parent_hash"] = first_parent_hash + + params["last_parent_hash"] = last_parent_hash + + params["parent_hash"] = parent_hash + + params["show_archived"] = show_archived + + params["is_template"] = is_template + + params["kind"] = kind + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "params": params, + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[ListScriptsResponse200Item]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = ListScriptsResponse200Item.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[ListScriptsResponse200Item]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, + order_desc: Union[Unset, None, bool] = UNSET, + created_by: Union[Unset, None, str] = UNSET, + path_start: Union[Unset, None, str] = UNSET, + path_exact: Union[Unset, None, str] = UNSET, + first_parent_hash: Union[Unset, None, str] = UNSET, + last_parent_hash: Union[Unset, None, str] = UNSET, + parent_hash: Union[Unset, None, str] = UNSET, + show_archived: Union[Unset, None, bool] = UNSET, + is_template: Union[Unset, None, bool] = UNSET, + kind: Union[Unset, None, str] = UNSET, +) -> Response[List[ListScriptsResponse200Item]]: + """list all available scripts + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + order_desc (Union[Unset, None, bool]): + created_by (Union[Unset, None, str]): + path_start (Union[Unset, None, str]): + path_exact (Union[Unset, None, str]): + first_parent_hash (Union[Unset, None, str]): + last_parent_hash (Union[Unset, None, str]): + parent_hash (Union[Unset, None, str]): + show_archived (Union[Unset, None, bool]): + is_template (Union[Unset, None, bool]): + kind (Union[Unset, None, str]): + + Returns: + Response[List[ListScriptsResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + order_desc=order_desc, + created_by=created_by, + path_start=path_start, + path_exact=path_exact, + first_parent_hash=first_parent_hash, + last_parent_hash=last_parent_hash, + parent_hash=parent_hash, + show_archived=show_archived, + is_template=is_template, + kind=kind, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, + order_desc: Union[Unset, None, bool] = UNSET, + created_by: Union[Unset, None, str] = UNSET, + path_start: Union[Unset, None, str] = UNSET, + path_exact: Union[Unset, None, str] = UNSET, + first_parent_hash: Union[Unset, None, str] = UNSET, + last_parent_hash: Union[Unset, None, str] = UNSET, + parent_hash: Union[Unset, None, str] = UNSET, + show_archived: Union[Unset, None, bool] = UNSET, + is_template: Union[Unset, None, bool] = UNSET, + kind: Union[Unset, None, str] = UNSET, +) -> Optional[List[ListScriptsResponse200Item]]: + """list all available scripts + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + order_desc (Union[Unset, None, bool]): + created_by (Union[Unset, None, str]): + path_start (Union[Unset, None, str]): + path_exact (Union[Unset, None, str]): + first_parent_hash (Union[Unset, None, str]): + last_parent_hash (Union[Unset, None, str]): + parent_hash (Union[Unset, None, str]): + show_archived (Union[Unset, None, bool]): + is_template (Union[Unset, None, bool]): + kind (Union[Unset, None, str]): + + Returns: + Response[List[ListScriptsResponse200Item]] + """ + + return sync_detailed( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + order_desc=order_desc, + created_by=created_by, + path_start=path_start, + path_exact=path_exact, + first_parent_hash=first_parent_hash, + last_parent_hash=last_parent_hash, + parent_hash=parent_hash, + show_archived=show_archived, + is_template=is_template, + kind=kind, + ).parsed + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, + order_desc: Union[Unset, None, bool] = UNSET, + created_by: Union[Unset, None, str] = UNSET, + path_start: Union[Unset, None, str] = UNSET, + path_exact: Union[Unset, None, str] = UNSET, + first_parent_hash: Union[Unset, None, str] = UNSET, + last_parent_hash: Union[Unset, None, str] = UNSET, + parent_hash: Union[Unset, None, str] = UNSET, + show_archived: Union[Unset, None, bool] = UNSET, + is_template: Union[Unset, None, bool] = UNSET, + kind: Union[Unset, None, str] = UNSET, +) -> Response[List[ListScriptsResponse200Item]]: + """list all available scripts + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + order_desc (Union[Unset, None, bool]): + created_by (Union[Unset, None, str]): + path_start (Union[Unset, None, str]): + path_exact (Union[Unset, None, str]): + first_parent_hash (Union[Unset, None, str]): + last_parent_hash (Union[Unset, None, str]): + parent_hash (Union[Unset, None, str]): + show_archived (Union[Unset, None, bool]): + is_template (Union[Unset, None, bool]): + kind (Union[Unset, None, str]): + + Returns: + Response[List[ListScriptsResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + order_desc=order_desc, + created_by=created_by, + path_start=path_start, + path_exact=path_exact, + first_parent_hash=first_parent_hash, + last_parent_hash=last_parent_hash, + parent_hash=parent_hash, + show_archived=show_archived, + is_template=is_template, + kind=kind, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, + order_desc: Union[Unset, None, bool] = UNSET, + created_by: Union[Unset, None, str] = UNSET, + path_start: Union[Unset, None, str] = UNSET, + path_exact: Union[Unset, None, str] = UNSET, + first_parent_hash: Union[Unset, None, str] = UNSET, + last_parent_hash: Union[Unset, None, str] = UNSET, + parent_hash: Union[Unset, None, str] = UNSET, + show_archived: Union[Unset, None, bool] = UNSET, + is_template: Union[Unset, None, bool] = UNSET, + kind: Union[Unset, None, str] = UNSET, +) -> Optional[List[ListScriptsResponse200Item]]: + """list all available scripts + + Args: + workspace (str): + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + order_desc (Union[Unset, None, bool]): + created_by (Union[Unset, None, str]): + path_start (Union[Unset, None, str]): + path_exact (Union[Unset, None, str]): + first_parent_hash (Union[Unset, None, str]): + last_parent_hash (Union[Unset, None, str]): + parent_hash (Union[Unset, None, str]): + show_archived (Union[Unset, None, bool]): + is_template (Union[Unset, None, bool]): + kind (Union[Unset, None, str]): + + Returns: + Response[List[ListScriptsResponse200Item]] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + client=client, + page=page, + per_page=per_page, + order_desc=order_desc, + created_by=created_by, + path_start=path_start, + path_exact=path_exact, + first_parent_hash=first_parent_hash, + last_parent_hash=last_parent_hash, + parent_hash=parent_hash, + show_archived=show_archived, + is_template=is_template, + kind=kind, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/script/python_to_jsonschema.py b/python-client/windmill-api/windmill_api/api/script/python_to_jsonschema.py new file mode 100644 index 0000000000..e6c5ef1948 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/script/python_to_jsonschema.py @@ -0,0 +1,140 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.python_to_jsonschema_response_200 import PythonToJsonschemaResponse200 +from ...types import Response + + +def _get_kwargs( + *, + client: Client, + json_body: str, +) -> Dict[str, Any]: + url = "{}/scripts/python/tojsonschema".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _parse_response(*, response: httpx.Response) -> Optional[PythonToJsonschemaResponse200]: + if response.status_code == 200: + response_200 = PythonToJsonschemaResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[PythonToJsonschemaResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + *, + client: Client, + json_body: str, +) -> Response[PythonToJsonschemaResponse200]: + """inspect python code to infer jsonschema of arguments + + Args: + json_body (str): + + Returns: + Response[PythonToJsonschemaResponse200] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + *, + client: Client, + json_body: str, +) -> Optional[PythonToJsonschemaResponse200]: + """inspect python code to infer jsonschema of arguments + + Args: + json_body (str): + + Returns: + Response[PythonToJsonschemaResponse200] + """ + + return sync_detailed( + client=client, + json_body=json_body, + ).parsed + + +async def asyncio_detailed( + *, + client: Client, + json_body: str, +) -> Response[PythonToJsonschemaResponse200]: + """inspect python code to infer jsonschema of arguments + + Args: + json_body (str): + + Returns: + Response[PythonToJsonschemaResponse200] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + *, + client: Client, + json_body: str, +) -> Optional[PythonToJsonschemaResponse200]: + """inspect python code to infer jsonschema of arguments + + Args: + json_body (str): + + Returns: + Response[PythonToJsonschemaResponse200] + """ + + return ( + await asyncio_detailed( + client=client, + json_body=json_body, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/script/raw_script_by_hash.py b/python-client/windmill-api/windmill_api/api/script/raw_script_by_hash.py new file mode 100644 index 0000000000..16535d7887 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/script/raw_script_by_hash.py @@ -0,0 +1,93 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/scripts/raw/h/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[Any]: + """raw script by hash + + Args: + workspace (str): + path (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[Any]: + """raw script by hash + + Args: + workspace (str): + path (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/script/raw_script_by_path.py b/python-client/windmill-api/windmill_api/api/script/raw_script_by_path.py new file mode 100644 index 0000000000..b45b213515 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/script/raw_script_by_path.py @@ -0,0 +1,93 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/scripts/raw/p/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[Any]: + """raw script by path + + Args: + workspace (str): + path (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[Any]: + """raw script by path + + Args: + workspace (str): + path (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/settings/__init__.py b/python-client/windmill-api/windmill_api/api/settings/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/python-client/windmill-api/windmill_api/api/settings/backend_version.py b/python-client/windmill-api/windmill_api/api/settings/backend_version.py new file mode 100644 index 0000000000..63c13c1439 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/settings/backend_version.py @@ -0,0 +1,75 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/version".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + *, + client: Client, +) -> Response[Any]: + """get backend version + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + *, + client: Client, +) -> Response[Any]: + """get backend version + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/settings/get_open_api_yaml.py b/python-client/windmill-api/windmill_api/api/settings/get_open_api_yaml.py new file mode 100644 index 0000000000..e2004ebad2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/settings/get_open_api_yaml.py @@ -0,0 +1,75 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/openapi.yaml".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + *, + client: Client, +) -> Response[Any]: + """get openapi yaml spec + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + *, + client: Client, +) -> Response[Any]: + """get openapi yaml spec + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/user/__init__.py b/python-client/windmill-api/windmill_api/api/user/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/python-client/windmill-api/windmill_api/api/user/accept_invite.py b/python-client/windmill-api/windmill_api/api/user/accept_invite.py new file mode 100644 index 0000000000..ea622f10c5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/user/accept_invite.py @@ -0,0 +1,90 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.accept_invite_json_body import AcceptInviteJsonBody +from ...types import Response + + +def _get_kwargs( + *, + client: Client, + json_body: AcceptInviteJsonBody, +) -> Dict[str, Any]: + url = "{}/users/accept_invite".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + *, + client: Client, + json_body: AcceptInviteJsonBody, +) -> Response[Any]: + """accept invite to workspace + + Args: + json_body (AcceptInviteJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + *, + client: Client, + json_body: AcceptInviteJsonBody, +) -> Response[Any]: + """accept invite to workspace + + Args: + json_body (AcceptInviteJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/user/create_token.py b/python-client/windmill-api/windmill_api/api/user/create_token.py new file mode 100644 index 0000000000..618eb0d0c6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/user/create_token.py @@ -0,0 +1,90 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.create_token_json_body import CreateTokenJsonBody +from ...types import Response + + +def _get_kwargs( + *, + client: Client, + json_body: CreateTokenJsonBody, +) -> Dict[str, Any]: + url = "{}/users/tokens/create".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + *, + client: Client, + json_body: CreateTokenJsonBody, +) -> Response[Any]: + """create token + + Args: + json_body (CreateTokenJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + *, + client: Client, + json_body: CreateTokenJsonBody, +) -> Response[Any]: + """create token + + Args: + json_body (CreateTokenJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/user/create_user.py b/python-client/windmill-api/windmill_api/api/user/create_user.py new file mode 100644 index 0000000000..a334dd893c --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/user/create_user.py @@ -0,0 +1,97 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.create_user_json_body import CreateUserJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, + json_body: CreateUserJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/users/add".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + json_body: CreateUserJsonBody, +) -> Response[Any]: + """create user (require admin privilege) + + Args: + workspace (str): + json_body (CreateUserJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + json_body: CreateUserJsonBody, +) -> Response[Any]: + """create user (require admin privilege) + + Args: + workspace (str): + json_body (CreateUserJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/user/create_user_globally.py b/python-client/windmill-api/windmill_api/api/user/create_user_globally.py new file mode 100644 index 0000000000..b7af12c3b8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/user/create_user_globally.py @@ -0,0 +1,90 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.create_user_globally_json_body import CreateUserGloballyJsonBody +from ...types import Response + + +def _get_kwargs( + *, + client: Client, + json_body: CreateUserGloballyJsonBody, +) -> Dict[str, Any]: + url = "{}/users/create".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + *, + client: Client, + json_body: CreateUserGloballyJsonBody, +) -> Response[Any]: + """create user + + Args: + json_body (CreateUserGloballyJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + *, + client: Client, + json_body: CreateUserGloballyJsonBody, +) -> Response[Any]: + """create user + + Args: + json_body (CreateUserGloballyJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/user/decline_invite.py b/python-client/windmill-api/windmill_api/api/user/decline_invite.py new file mode 100644 index 0000000000..a067806bb4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/user/decline_invite.py @@ -0,0 +1,90 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.decline_invite_json_body import DeclineInviteJsonBody +from ...types import Response + + +def _get_kwargs( + *, + client: Client, + json_body: DeclineInviteJsonBody, +) -> Dict[str, Any]: + url = "{}/users/decline_invite".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + *, + client: Client, + json_body: DeclineInviteJsonBody, +) -> Response[Any]: + """decline invite to workspace + + Args: + json_body (DeclineInviteJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + *, + client: Client, + json_body: DeclineInviteJsonBody, +) -> Response[Any]: + """decline invite to workspace + + Args: + json_body (DeclineInviteJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/user/delete_token.py b/python-client/windmill-api/windmill_api/api/user/delete_token.py new file mode 100644 index 0000000000..6e4abd679f --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/user/delete_token.py @@ -0,0 +1,86 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + token_prefix: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/users/tokens/delete/{token_prefix}".format(client.base_url, token_prefix=token_prefix) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "delete", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + token_prefix: str, + *, + client: Client, +) -> Response[Any]: + """delete token + + Args: + token_prefix (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + token_prefix=token_prefix, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + token_prefix: str, + *, + client: Client, +) -> Response[Any]: + """delete token + + Args: + token_prefix (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + token_prefix=token_prefix, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/user/delete_user.py b/python-client/windmill-api/windmill_api/api/user/delete_user.py new file mode 100644 index 0000000000..d06b4f00e0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/user/delete_user.py @@ -0,0 +1,93 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + workspace: str, + username: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/users/delete/{username}".format(client.base_url, workspace=workspace, username=username) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "delete", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + username: str, + *, + client: Client, +) -> Response[Any]: + """delete user (require admin privilege) + + Args: + workspace (str): + username (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + username=username, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + username: str, + *, + client: Client, +) -> Response[Any]: + """delete user (require admin privilege) + + Args: + workspace (str): + username (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + username=username, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/user/get_current_email.py b/python-client/windmill-api/windmill_api/api/user/get_current_email.py new file mode 100644 index 0000000000..5d1650adef --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/user/get_current_email.py @@ -0,0 +1,75 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/users/email".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + *, + client: Client, +) -> Response[Any]: + """get current user email (if logged in) + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + *, + client: Client, +) -> Response[Any]: + """get current user email (if logged in) + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/user/global_user_update.py b/python-client/windmill-api/windmill_api/api/user/global_user_update.py new file mode 100644 index 0000000000..b47299d94e --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/user/global_user_update.py @@ -0,0 +1,97 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.global_user_update_json_body import GlobalUserUpdateJsonBody +from ...types import Response + + +def _get_kwargs( + email: str, + *, + client: Client, + json_body: GlobalUserUpdateJsonBody, +) -> Dict[str, Any]: + url = "{}/users/update/{email}".format(client.base_url, email=email) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + email: str, + *, + client: Client, + json_body: GlobalUserUpdateJsonBody, +) -> Response[Any]: + """global update user (require super admin) + + Args: + email (str): + json_body (GlobalUserUpdateJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + email=email, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + email: str, + *, + client: Client, + json_body: GlobalUserUpdateJsonBody, +) -> Response[Any]: + """global update user (require super admin) + + Args: + email (str): + json_body (GlobalUserUpdateJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + email=email, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/user/global_whoami.py b/python-client/windmill-api/windmill_api/api/user/global_whoami.py new file mode 100644 index 0000000000..d7f5d91357 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/user/global_whoami.py @@ -0,0 +1,116 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.global_whoami_response_200 import GlobalWhoamiResponse200 +from ...types import Response + + +def _get_kwargs( + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/users/whoami".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[GlobalWhoamiResponse200]: + if response.status_code == 200: + response_200 = GlobalWhoamiResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[GlobalWhoamiResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + *, + client: Client, +) -> Response[GlobalWhoamiResponse200]: + """get current global whoami (if logged in) + + Returns: + Response[GlobalWhoamiResponse200] + """ + + kwargs = _get_kwargs( + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + *, + client: Client, +) -> Optional[GlobalWhoamiResponse200]: + """get current global whoami (if logged in) + + Returns: + Response[GlobalWhoamiResponse200] + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: Client, +) -> Response[GlobalWhoamiResponse200]: + """get current global whoami (if logged in) + + Returns: + Response[GlobalWhoamiResponse200] + """ + + kwargs = _get_kwargs( + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + *, + client: Client, +) -> Optional[GlobalWhoamiResponse200]: + """get current global whoami (if logged in) + + Returns: + Response[GlobalWhoamiResponse200] + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/user/leave_workspace.py b/python-client/windmill-api/windmill_api/api/user/leave_workspace.py new file mode 100644 index 0000000000..e735d0a6e2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/user/leave_workspace.py @@ -0,0 +1,86 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/users/leave_workspace".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, +) -> Response[Any]: + """leave workspace + + Args: + workspace (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, +) -> Response[Any]: + """leave workspace + + Args: + workspace (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/user/list_tokens.py b/python-client/windmill-api/windmill_api/api/user/list_tokens.py new file mode 100644 index 0000000000..c358a53aaa --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/user/list_tokens.py @@ -0,0 +1,121 @@ +from typing import Any, Dict, List, Optional + +import httpx + +from ...client import Client +from ...models.list_tokens_response_200_item import ListTokensResponse200Item +from ...types import Response + + +def _get_kwargs( + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/users/tokens/list".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[ListTokensResponse200Item]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = ListTokensResponse200Item.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[ListTokensResponse200Item]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + *, + client: Client, +) -> Response[List[ListTokensResponse200Item]]: + """list token + + Returns: + Response[List[ListTokensResponse200Item]] + """ + + kwargs = _get_kwargs( + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + *, + client: Client, +) -> Optional[List[ListTokensResponse200Item]]: + """list token + + Returns: + Response[List[ListTokensResponse200Item]] + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: Client, +) -> Response[List[ListTokensResponse200Item]]: + """list token + + Returns: + Response[List[ListTokensResponse200Item]] + """ + + kwargs = _get_kwargs( + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + *, + client: Client, +) -> Optional[List[ListTokensResponse200Item]]: + """list token + + Returns: + Response[List[ListTokensResponse200Item]] + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/user/list_usernames.py b/python-client/windmill-api/windmill_api/api/user/list_usernames.py new file mode 100644 index 0000000000..65bbe89970 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/user/list_usernames.py @@ -0,0 +1,136 @@ +from typing import Any, Dict, List, Optional, cast + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/users/list_usernames".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[str]]: + if response.status_code == 200: + response_200 = cast(List[str], response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[str]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, +) -> Response[List[str]]: + """list usernames + + Args: + workspace (str): + + Returns: + Response[List[str]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + *, + client: Client, +) -> Optional[List[str]]: + """list usernames + + Args: + workspace (str): + + Returns: + Response[List[str]] + """ + + return sync_detailed( + workspace=workspace, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, +) -> Response[List[str]]: + """list usernames + + Args: + workspace (str): + + Returns: + Response[List[str]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + *, + client: Client, +) -> Optional[List[str]]: + """list usernames + + Args: + workspace (str): + + Returns: + Response[List[str]] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/user/list_users.py b/python-client/windmill-api/windmill_api/api/user/list_users.py new file mode 100644 index 0000000000..e133de225a --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/user/list_users.py @@ -0,0 +1,142 @@ +from typing import Any, Dict, List, Optional + +import httpx + +from ...client import Client +from ...models.list_users_response_200_item import ListUsersResponse200Item +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/users/list".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[ListUsersResponse200Item]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = ListUsersResponse200Item.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[ListUsersResponse200Item]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, +) -> Response[List[ListUsersResponse200Item]]: + """list users + + Args: + workspace (str): + + Returns: + Response[List[ListUsersResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + *, + client: Client, +) -> Optional[List[ListUsersResponse200Item]]: + """list users + + Args: + workspace (str): + + Returns: + Response[List[ListUsersResponse200Item]] + """ + + return sync_detailed( + workspace=workspace, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, +) -> Response[List[ListUsersResponse200Item]]: + """list users + + Args: + workspace (str): + + Returns: + Response[List[ListUsersResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + *, + client: Client, +) -> Optional[List[ListUsersResponse200Item]]: + """list users + + Args: + workspace (str): + + Returns: + Response[List[ListUsersResponse200Item]] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/user/list_users_as_super_admin.py b/python-client/windmill-api/windmill_api/api/user/list_users_as_super_admin.py new file mode 100644 index 0000000000..9dff5f0a6d --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/user/list_users_as_super_admin.py @@ -0,0 +1,163 @@ +from typing import Any, Dict, List, Optional, Union + +import httpx + +from ...client import Client +from ...models.list_users_as_super_admin_response_200_item import ListUsersAsSuperAdminResponse200Item +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Dict[str, Any]: + url = "{}/users/list_as_super_admin".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + params: Dict[str, Any] = {} + params["page"] = page + + params["per_page"] = per_page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "params": params, + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[ListUsersAsSuperAdminResponse200Item]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = ListUsersAsSuperAdminResponse200Item.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[ListUsersAsSuperAdminResponse200Item]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Response[List[ListUsersAsSuperAdminResponse200Item]]: + """list all users as super admin (require to be super amdin) + + Args: + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + + Returns: + Response[List[ListUsersAsSuperAdminResponse200Item]] + """ + + kwargs = _get_kwargs( + client=client, + page=page, + per_page=per_page, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Optional[List[ListUsersAsSuperAdminResponse200Item]]: + """list all users as super admin (require to be super amdin) + + Args: + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + + Returns: + Response[List[ListUsersAsSuperAdminResponse200Item]] + """ + + return sync_detailed( + client=client, + page=page, + per_page=per_page, + ).parsed + + +async def asyncio_detailed( + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Response[List[ListUsersAsSuperAdminResponse200Item]]: + """list all users as super admin (require to be super amdin) + + Args: + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + + Returns: + Response[List[ListUsersAsSuperAdminResponse200Item]] + """ + + kwargs = _get_kwargs( + client=client, + page=page, + per_page=per_page, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Optional[List[ListUsersAsSuperAdminResponse200Item]]: + """list all users as super admin (require to be super amdin) + + Args: + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + + Returns: + Response[List[ListUsersAsSuperAdminResponse200Item]] + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + per_page=per_page, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/user/list_workspace_invites.py b/python-client/windmill-api/windmill_api/api/user/list_workspace_invites.py new file mode 100644 index 0000000000..79f42c4fde --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/user/list_workspace_invites.py @@ -0,0 +1,121 @@ +from typing import Any, Dict, List, Optional + +import httpx + +from ...client import Client +from ...models.list_workspace_invites_response_200_item import ListWorkspaceInvitesResponse200Item +from ...types import Response + + +def _get_kwargs( + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/users/list_invites".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[ListWorkspaceInvitesResponse200Item]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = ListWorkspaceInvitesResponse200Item.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[ListWorkspaceInvitesResponse200Item]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + *, + client: Client, +) -> Response[List[ListWorkspaceInvitesResponse200Item]]: + """list all workspace invites + + Returns: + Response[List[ListWorkspaceInvitesResponse200Item]] + """ + + kwargs = _get_kwargs( + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + *, + client: Client, +) -> Optional[List[ListWorkspaceInvitesResponse200Item]]: + """list all workspace invites + + Returns: + Response[List[ListWorkspaceInvitesResponse200Item]] + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: Client, +) -> Response[List[ListWorkspaceInvitesResponse200Item]]: + """list all workspace invites + + Returns: + Response[List[ListWorkspaceInvitesResponse200Item]] + """ + + kwargs = _get_kwargs( + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + *, + client: Client, +) -> Optional[List[ListWorkspaceInvitesResponse200Item]]: + """list all workspace invites + + Returns: + Response[List[ListWorkspaceInvitesResponse200Item]] + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/user/login.py b/python-client/windmill-api/windmill_api/api/user/login.py new file mode 100644 index 0000000000..5504b7128c --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/user/login.py @@ -0,0 +1,90 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.login_json_body import LoginJsonBody +from ...types import Response + + +def _get_kwargs( + *, + client: Client, + json_body: LoginJsonBody, +) -> Dict[str, Any]: + url = "{}/auth/login".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + *, + client: Client, + json_body: LoginJsonBody, +) -> Response[Any]: + """login with password + + Args: + json_body (LoginJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + *, + client: Client, + json_body: LoginJsonBody, +) -> Response[Any]: + """login with password + + Args: + json_body (LoginJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/user/login_with_oauth.py b/python-client/windmill-api/windmill_api/api/user/login_with_oauth.py new file mode 100644 index 0000000000..0a927cdac3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/user/login_with_oauth.py @@ -0,0 +1,97 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.login_with_oauth_json_body import LoginWithOauthJsonBody +from ...types import Response + + +def _get_kwargs( + client_name: str, + *, + client: Client, + json_body: LoginWithOauthJsonBody, +) -> Dict[str, Any]: + url = "{}/oauth/login_callback/{client_name}".format(client.base_url, client_name=client_name) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + client_name: str, + *, + client: Client, + json_body: LoginWithOauthJsonBody, +) -> Response[Any]: + """login with oauth authorization flow + + Args: + client_name (str): + json_body (LoginWithOauthJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client_name=client_name, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + client_name: str, + *, + client: Client, + json_body: LoginWithOauthJsonBody, +) -> Response[Any]: + """login with oauth authorization flow + + Args: + client_name (str): + json_body (LoginWithOauthJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client_name=client_name, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/user/logout.py b/python-client/windmill-api/windmill_api/api/user/logout.py new file mode 100644 index 0000000000..67bca57b3d --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/user/logout.py @@ -0,0 +1,75 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/users/logout".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + *, + client: Client, +) -> Response[Any]: + """logout + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + *, + client: Client, +) -> Response[Any]: + """logout + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/user/set_password.py b/python-client/windmill-api/windmill_api/api/user/set_password.py new file mode 100644 index 0000000000..c8f1df33c2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/user/set_password.py @@ -0,0 +1,90 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.set_password_json_body import SetPasswordJsonBody +from ...types import Response + + +def _get_kwargs( + *, + client: Client, + json_body: SetPasswordJsonBody, +) -> Dict[str, Any]: + url = "{}/users/setpassword".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + *, + client: Client, + json_body: SetPasswordJsonBody, +) -> Response[Any]: + """set password + + Args: + json_body (SetPasswordJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + *, + client: Client, + json_body: SetPasswordJsonBody, +) -> Response[Any]: + """set password + + Args: + json_body (SetPasswordJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/user/update_user.py b/python-client/windmill-api/windmill_api/api/user/update_user.py new file mode 100644 index 0000000000..453a0ddae9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/user/update_user.py @@ -0,0 +1,104 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.update_user_json_body import UpdateUserJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + username: str, + *, + client: Client, + json_body: UpdateUserJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/users/update/{username}".format(client.base_url, workspace=workspace, username=username) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + username: str, + *, + client: Client, + json_body: UpdateUserJsonBody, +) -> Response[Any]: + """update user (require admin privilege) + + Args: + workspace (str): + username (str): + json_body (UpdateUserJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + username=username, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + username: str, + *, + client: Client, + json_body: UpdateUserJsonBody, +) -> Response[Any]: + """update user (require admin privilege) + + Args: + workspace (str): + username (str): + json_body (UpdateUserJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + username=username, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/user/whoami.py b/python-client/windmill-api/windmill_api/api/user/whoami.py new file mode 100644 index 0000000000..0dda3c9da2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/user/whoami.py @@ -0,0 +1,137 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.whoami_response_200 import WhoamiResponse200 +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/users/whoami".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[WhoamiResponse200]: + if response.status_code == 200: + response_200 = WhoamiResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[WhoamiResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, +) -> Response[WhoamiResponse200]: + """whoami + + Args: + workspace (str): + + Returns: + Response[WhoamiResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + *, + client: Client, +) -> Optional[WhoamiResponse200]: + """whoami + + Args: + workspace (str): + + Returns: + Response[WhoamiResponse200] + """ + + return sync_detailed( + workspace=workspace, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, +) -> Response[WhoamiResponse200]: + """whoami + + Args: + workspace (str): + + Returns: + Response[WhoamiResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + *, + client: Client, +) -> Optional[WhoamiResponse200]: + """whoami + + Args: + workspace (str): + + Returns: + Response[WhoamiResponse200] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/user/whois.py b/python-client/windmill-api/windmill_api/api/user/whois.py new file mode 100644 index 0000000000..5a1c5115c5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/user/whois.py @@ -0,0 +1,150 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.whois_response_200 import WhoisResponse200 +from ...types import Response + + +def _get_kwargs( + workspace: str, + username: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/users/whois/{username}".format(client.base_url, workspace=workspace, username=username) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[WhoisResponse200]: + if response.status_code == 200: + response_200 = WhoisResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[WhoisResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + username: str, + *, + client: Client, +) -> Response[WhoisResponse200]: + """whois + + Args: + workspace (str): + username (str): + + Returns: + Response[WhoisResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + username=username, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + username: str, + *, + client: Client, +) -> Optional[WhoisResponse200]: + """whois + + Args: + workspace (str): + username (str): + + Returns: + Response[WhoisResponse200] + """ + + return sync_detailed( + workspace=workspace, + username=username, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + username: str, + *, + client: Client, +) -> Response[WhoisResponse200]: + """whois + + Args: + workspace (str): + username (str): + + Returns: + Response[WhoisResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + username=username, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + username: str, + *, + client: Client, +) -> Optional[WhoisResponse200]: + """whois + + Args: + workspace (str): + username (str): + + Returns: + Response[WhoisResponse200] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + username=username, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/variable/__init__.py b/python-client/windmill-api/windmill_api/api/variable/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/python-client/windmill-api/windmill_api/api/variable/create_variable.py b/python-client/windmill-api/windmill_api/api/variable/create_variable.py new file mode 100644 index 0000000000..ffcfa80d4a --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/variable/create_variable.py @@ -0,0 +1,97 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.create_variable_json_body import CreateVariableJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, + json_body: CreateVariableJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/variables/create".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + json_body: CreateVariableJsonBody, +) -> Response[Any]: + """create variable + + Args: + workspace (str): + json_body (CreateVariableJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + json_body: CreateVariableJsonBody, +) -> Response[Any]: + """create variable + + Args: + workspace (str): + json_body (CreateVariableJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/variable/delete_variable.py b/python-client/windmill-api/windmill_api/api/variable/delete_variable.py new file mode 100644 index 0000000000..5a973dac4e --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/variable/delete_variable.py @@ -0,0 +1,93 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/variables/delete/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "delete", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[Any]: + """delete variable + + Args: + workspace (str): + path (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[Any]: + """delete variable + + Args: + workspace (str): + path (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/variable/exists_variable.py b/python-client/windmill-api/windmill_api/api/variable/exists_variable.py new file mode 100644 index 0000000000..660655d526 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/variable/exists_variable.py @@ -0,0 +1,148 @@ +from typing import Any, Dict, Optional, cast + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/variables/exists/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[bool]: + if response.status_code == 200: + response_200 = cast(bool, response.json()) + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[bool]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[bool]: + """does variable exists at path + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + path: str, + *, + client: Client, +) -> Optional[bool]: + """does variable exists at path + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + return sync_detailed( + workspace=workspace, + path=path, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, +) -> Response[bool]: + """does variable exists at path + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + path: str, + *, + client: Client, +) -> Optional[bool]: + """does variable exists at path + + Args: + workspace (str): + path (str): + + Returns: + Response[bool] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + path=path, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/variable/get_variable.py b/python-client/windmill-api/windmill_api/api/variable/get_variable.py new file mode 100644 index 0000000000..eba9ae7406 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/variable/get_variable.py @@ -0,0 +1,169 @@ +from typing import Any, Dict, Optional, Union + +import httpx + +from ...client import Client +from ...models.get_variable_response_200 import GetVariableResponse200 +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, + decrypt_secret: Union[Unset, None, bool] = UNSET, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/variables/get/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + params: Dict[str, Any] = {} + params["decrypt_secret"] = decrypt_secret + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "params": params, + } + + +def _parse_response(*, response: httpx.Response) -> Optional[GetVariableResponse200]: + if response.status_code == 200: + response_200 = GetVariableResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[GetVariableResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, + decrypt_secret: Union[Unset, None, bool] = UNSET, +) -> Response[GetVariableResponse200]: + """get variable + + Args: + workspace (str): + path (str): + decrypt_secret (Union[Unset, None, bool]): + + Returns: + Response[GetVariableResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + decrypt_secret=decrypt_secret, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + path: str, + *, + client: Client, + decrypt_secret: Union[Unset, None, bool] = UNSET, +) -> Optional[GetVariableResponse200]: + """get variable + + Args: + workspace (str): + path (str): + decrypt_secret (Union[Unset, None, bool]): + + Returns: + Response[GetVariableResponse200] + """ + + return sync_detailed( + workspace=workspace, + path=path, + client=client, + decrypt_secret=decrypt_secret, + ).parsed + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, + decrypt_secret: Union[Unset, None, bool] = UNSET, +) -> Response[GetVariableResponse200]: + """get variable + + Args: + workspace (str): + path (str): + decrypt_secret (Union[Unset, None, bool]): + + Returns: + Response[GetVariableResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + decrypt_secret=decrypt_secret, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + path: str, + *, + client: Client, + decrypt_secret: Union[Unset, None, bool] = UNSET, +) -> Optional[GetVariableResponse200]: + """get variable + + Args: + workspace (str): + path (str): + decrypt_secret (Union[Unset, None, bool]): + + Returns: + Response[GetVariableResponse200] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + path=path, + client=client, + decrypt_secret=decrypt_secret, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/variable/list_contextual_variables.py b/python-client/windmill-api/windmill_api/api/variable/list_contextual_variables.py new file mode 100644 index 0000000000..276d7acffc --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/variable/list_contextual_variables.py @@ -0,0 +1,142 @@ +from typing import Any, Dict, List, Optional + +import httpx + +from ...client import Client +from ...models.list_contextual_variables_response_200_item import ListContextualVariablesResponse200Item +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/variables/list_contextual".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[ListContextualVariablesResponse200Item]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = ListContextualVariablesResponse200Item.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[ListContextualVariablesResponse200Item]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, +) -> Response[List[ListContextualVariablesResponse200Item]]: + """list contextual variables + + Args: + workspace (str): + + Returns: + Response[List[ListContextualVariablesResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + *, + client: Client, +) -> Optional[List[ListContextualVariablesResponse200Item]]: + """list contextual variables + + Args: + workspace (str): + + Returns: + Response[List[ListContextualVariablesResponse200Item]] + """ + + return sync_detailed( + workspace=workspace, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, +) -> Response[List[ListContextualVariablesResponse200Item]]: + """list contextual variables + + Args: + workspace (str): + + Returns: + Response[List[ListContextualVariablesResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + *, + client: Client, +) -> Optional[List[ListContextualVariablesResponse200Item]]: + """list contextual variables + + Args: + workspace (str): + + Returns: + Response[List[ListContextualVariablesResponse200Item]] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/variable/list_variable.py b/python-client/windmill-api/windmill_api/api/variable/list_variable.py new file mode 100644 index 0000000000..af5adc168a --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/variable/list_variable.py @@ -0,0 +1,142 @@ +from typing import Any, Dict, List, Optional + +import httpx + +from ...client import Client +from ...models.list_variable_response_200_item import ListVariableResponse200Item +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/variables/list".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[ListVariableResponse200Item]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = ListVariableResponse200Item.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[ListVariableResponse200Item]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, +) -> Response[List[ListVariableResponse200Item]]: + """list variables + + Args: + workspace (str): + + Returns: + Response[List[ListVariableResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + *, + client: Client, +) -> Optional[List[ListVariableResponse200Item]]: + """list variables + + Args: + workspace (str): + + Returns: + Response[List[ListVariableResponse200Item]] + """ + + return sync_detailed( + workspace=workspace, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, +) -> Response[List[ListVariableResponse200Item]]: + """list variables + + Args: + workspace (str): + + Returns: + Response[List[ListVariableResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + *, + client: Client, +) -> Optional[List[ListVariableResponse200Item]]: + """list variables + + Args: + workspace (str): + + Returns: + Response[List[ListVariableResponse200Item]] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/variable/update_variable.py b/python-client/windmill-api/windmill_api/api/variable/update_variable.py new file mode 100644 index 0000000000..5dca6fa11e --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/variable/update_variable.py @@ -0,0 +1,104 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.update_variable_json_body import UpdateVariableJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + path: str, + *, + client: Client, + json_body: UpdateVariableJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/variables/update/{path}".format(client.base_url, workspace=workspace, path=path) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + path: str, + *, + client: Client, + json_body: UpdateVariableJsonBody, +) -> Response[Any]: + """update variable + + Args: + workspace (str): + path (str): + json_body (UpdateVariableJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + path: str, + *, + client: Client, + json_body: UpdateVariableJsonBody, +) -> Response[Any]: + """update variable + + Args: + workspace (str): + path (str): + json_body (UpdateVariableJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + path=path, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/worker/__init__.py b/python-client/windmill-api/windmill_api/api/worker/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/python-client/windmill-api/windmill_api/api/worker/list_workers.py b/python-client/windmill-api/windmill_api/api/worker/list_workers.py new file mode 100644 index 0000000000..16c5314982 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/worker/list_workers.py @@ -0,0 +1,163 @@ +from typing import Any, Dict, List, Optional, Union + +import httpx + +from ...client import Client +from ...models.list_workers_response_200_item import ListWorkersResponse200Item +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Dict[str, Any]: + url = "{}/workers/list".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + params: Dict[str, Any] = {} + params["page"] = page + + params["per_page"] = per_page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "params": params, + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[ListWorkersResponse200Item]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = ListWorkersResponse200Item.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[ListWorkersResponse200Item]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Response[List[ListWorkersResponse200Item]]: + """list workers + + Args: + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + + Returns: + Response[List[ListWorkersResponse200Item]] + """ + + kwargs = _get_kwargs( + client=client, + page=page, + per_page=per_page, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Optional[List[ListWorkersResponse200Item]]: + """list workers + + Args: + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + + Returns: + Response[List[ListWorkersResponse200Item]] + """ + + return sync_detailed( + client=client, + page=page, + per_page=per_page, + ).parsed + + +async def asyncio_detailed( + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Response[List[ListWorkersResponse200Item]]: + """list workers + + Args: + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + + Returns: + Response[List[ListWorkersResponse200Item]] + """ + + kwargs = _get_kwargs( + client=client, + page=page, + per_page=per_page, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Optional[List[ListWorkersResponse200Item]]: + """list workers + + Args: + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + + Returns: + Response[List[ListWorkersResponse200Item]] + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + per_page=per_page, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/workspace/__init__.py b/python-client/windmill-api/windmill_api/api/workspace/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/python-client/windmill-api/windmill_api/api/workspace/create_workspace.py b/python-client/windmill-api/windmill_api/api/workspace/create_workspace.py new file mode 100644 index 0000000000..cc81b64c01 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/workspace/create_workspace.py @@ -0,0 +1,90 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.create_workspace_json_body import CreateWorkspaceJsonBody +from ...types import Response + + +def _get_kwargs( + *, + client: Client, + json_body: CreateWorkspaceJsonBody, +) -> Dict[str, Any]: + url = "{}/workspaces/create".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + *, + client: Client, + json_body: CreateWorkspaceJsonBody, +) -> Response[Any]: + """create workspace + + Args: + json_body (CreateWorkspaceJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + *, + client: Client, + json_body: CreateWorkspaceJsonBody, +) -> Response[Any]: + """create workspace + + Args: + json_body (CreateWorkspaceJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/workspace/delete_invite.py b/python-client/windmill-api/windmill_api/api/workspace/delete_invite.py new file mode 100644 index 0000000000..edb148aeea --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/workspace/delete_invite.py @@ -0,0 +1,97 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.delete_invite_json_body import DeleteInviteJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, + json_body: DeleteInviteJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/workspaces/delete_invite".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + json_body: DeleteInviteJsonBody, +) -> Response[Any]: + """delete user invite + + Args: + workspace (str): + json_body (DeleteInviteJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + json_body: DeleteInviteJsonBody, +) -> Response[Any]: + """delete user invite + + Args: + workspace (str): + json_body (DeleteInviteJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/workspace/delete_workspace.py b/python-client/windmill-api/windmill_api/api/workspace/delete_workspace.py new file mode 100644 index 0000000000..194b27bacd --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/workspace/delete_workspace.py @@ -0,0 +1,86 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/workspaces/delete".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "delete", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, +) -> Response[Any]: + """delete workspace + + Args: + workspace (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, +) -> Response[Any]: + """delete workspace + + Args: + workspace (str): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/workspace/edit_slack_command.py b/python-client/windmill-api/windmill_api/api/workspace/edit_slack_command.py new file mode 100644 index 0000000000..7a4a41cbbb --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/workspace/edit_slack_command.py @@ -0,0 +1,97 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.edit_slack_command_json_body import EditSlackCommandJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, + json_body: EditSlackCommandJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/workspaces/edit_slack_command".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + json_body: EditSlackCommandJsonBody, +) -> Response[Any]: + """edit slack command + + Args: + workspace (str): + json_body (EditSlackCommandJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + json_body: EditSlackCommandJsonBody, +) -> Response[Any]: + """edit slack command + + Args: + workspace (str): + json_body (EditSlackCommandJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/workspace/exists_username.py b/python-client/windmill-api/windmill_api/api/workspace/exists_username.py new file mode 100644 index 0000000000..46ac16d373 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/workspace/exists_username.py @@ -0,0 +1,90 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.exists_username_json_body import ExistsUsernameJsonBody +from ...types import Response + + +def _get_kwargs( + *, + client: Client, + json_body: ExistsUsernameJsonBody, +) -> Dict[str, Any]: + url = "{}/workspaces/exists_username".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + *, + client: Client, + json_body: ExistsUsernameJsonBody, +) -> Response[Any]: + """exists username + + Args: + json_body (ExistsUsernameJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + *, + client: Client, + json_body: ExistsUsernameJsonBody, +) -> Response[Any]: + """exists username + + Args: + json_body (ExistsUsernameJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/workspace/exists_workspace.py b/python-client/windmill-api/windmill_api/api/workspace/exists_workspace.py new file mode 100644 index 0000000000..d00e8cc80e --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/workspace/exists_workspace.py @@ -0,0 +1,90 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.exists_workspace_json_body import ExistsWorkspaceJsonBody +from ...types import Response + + +def _get_kwargs( + *, + client: Client, + json_body: ExistsWorkspaceJsonBody, +) -> Dict[str, Any]: + url = "{}/workspaces/exists".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + *, + client: Client, + json_body: ExistsWorkspaceJsonBody, +) -> Response[Any]: + """exists workspace + + Args: + json_body (ExistsWorkspaceJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + *, + client: Client, + json_body: ExistsWorkspaceJsonBody, +) -> Response[Any]: + """exists workspace + + Args: + json_body (ExistsWorkspaceJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/workspace/get_settings.py b/python-client/windmill-api/windmill_api/api/workspace/get_settings.py new file mode 100644 index 0000000000..bf8c06810c --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/workspace/get_settings.py @@ -0,0 +1,137 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.get_settings_response_200 import GetSettingsResponse200 +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/workspaces/get_settings".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[GetSettingsResponse200]: + if response.status_code == 200: + response_200 = GetSettingsResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[GetSettingsResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, +) -> Response[GetSettingsResponse200]: + """get settings + + Args: + workspace (str): + + Returns: + Response[GetSettingsResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + *, + client: Client, +) -> Optional[GetSettingsResponse200]: + """get settings + + Args: + workspace (str): + + Returns: + Response[GetSettingsResponse200] + """ + + return sync_detailed( + workspace=workspace, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, +) -> Response[GetSettingsResponse200]: + """get settings + + Args: + workspace (str): + + Returns: + Response[GetSettingsResponse200] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + *, + client: Client, +) -> Optional[GetSettingsResponse200]: + """get settings + + Args: + workspace (str): + + Returns: + Response[GetSettingsResponse200] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/workspace/invite_user.py b/python-client/windmill-api/windmill_api/api/workspace/invite_user.py new file mode 100644 index 0000000000..b547a9953d --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/workspace/invite_user.py @@ -0,0 +1,97 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...models.invite_user_json_body import InviteUserJsonBody +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, + json_body: InviteUserJsonBody, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/workspaces/invite_user".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "json": json_json_body, + } + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=None, + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, + json_body: InviteUserJsonBody, +) -> Response[Any]: + """invite user to workspace + + Args: + workspace (str): + json_body (InviteUserJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, + json_body: InviteUserJsonBody, +) -> Response[Any]: + """invite user to workspace + + Args: + workspace (str): + json_body (InviteUserJsonBody): + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + json_body=json_body, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) diff --git a/python-client/windmill-api/windmill_api/api/workspace/list_pending_invites.py b/python-client/windmill-api/windmill_api/api/workspace/list_pending_invites.py new file mode 100644 index 0000000000..07d95d00f7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/workspace/list_pending_invites.py @@ -0,0 +1,142 @@ +from typing import Any, Dict, List, Optional + +import httpx + +from ...client import Client +from ...models.list_pending_invites_response_200_item import ListPendingInvitesResponse200Item +from ...types import Response + + +def _get_kwargs( + workspace: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/w/{workspace}/workspaces/list_pending_invites".format(client.base_url, workspace=workspace) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[ListPendingInvitesResponse200Item]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = ListPendingInvitesResponse200Item.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[ListPendingInvitesResponse200Item]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + workspace: str, + *, + client: Client, +) -> Response[List[ListPendingInvitesResponse200Item]]: + """list pending invites for a workspace + + Args: + workspace (str): + + Returns: + Response[List[ListPendingInvitesResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + workspace: str, + *, + client: Client, +) -> Optional[List[ListPendingInvitesResponse200Item]]: + """list pending invites for a workspace + + Args: + workspace (str): + + Returns: + Response[List[ListPendingInvitesResponse200Item]] + """ + + return sync_detailed( + workspace=workspace, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace: str, + *, + client: Client, +) -> Response[List[ListPendingInvitesResponse200Item]]: + """list pending invites for a workspace + + Args: + workspace (str): + + Returns: + Response[List[ListPendingInvitesResponse200Item]] + """ + + kwargs = _get_kwargs( + workspace=workspace, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + workspace: str, + *, + client: Client, +) -> Optional[List[ListPendingInvitesResponse200Item]]: + """list pending invites for a workspace + + Args: + workspace (str): + + Returns: + Response[List[ListPendingInvitesResponse200Item]] + """ + + return ( + await asyncio_detailed( + workspace=workspace, + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/workspace/list_user_workspaces.py b/python-client/windmill-api/windmill_api/api/workspace/list_user_workspaces.py new file mode 100644 index 0000000000..2a8f9ec389 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/workspace/list_user_workspaces.py @@ -0,0 +1,116 @@ +from typing import Any, Dict, Optional + +import httpx + +from ...client import Client +from ...models.list_user_workspaces_response_200 import ListUserWorkspacesResponse200 +from ...types import Response + + +def _get_kwargs( + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/workspaces/users".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[ListUserWorkspacesResponse200]: + if response.status_code == 200: + response_200 = ListUserWorkspacesResponse200.from_dict(response.json()) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[ListUserWorkspacesResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + *, + client: Client, +) -> Response[ListUserWorkspacesResponse200]: + """list all workspaces visible to me with user info + + Returns: + Response[ListUserWorkspacesResponse200] + """ + + kwargs = _get_kwargs( + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + *, + client: Client, +) -> Optional[ListUserWorkspacesResponse200]: + """list all workspaces visible to me with user info + + Returns: + Response[ListUserWorkspacesResponse200] + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: Client, +) -> Response[ListUserWorkspacesResponse200]: + """list all workspaces visible to me with user info + + Returns: + Response[ListUserWorkspacesResponse200] + """ + + kwargs = _get_kwargs( + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + *, + client: Client, +) -> Optional[ListUserWorkspacesResponse200]: + """list all workspaces visible to me with user info + + Returns: + Response[ListUserWorkspacesResponse200] + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/workspace/list_workspaces.py b/python-client/windmill-api/windmill_api/api/workspace/list_workspaces.py new file mode 100644 index 0000000000..7ba84a25f8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/workspace/list_workspaces.py @@ -0,0 +1,121 @@ +from typing import Any, Dict, List, Optional + +import httpx + +from ...client import Client +from ...models.list_workspaces_response_200_item import ListWorkspacesResponse200Item +from ...types import Response + + +def _get_kwargs( + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/workspaces/list".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[ListWorkspacesResponse200Item]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = ListWorkspacesResponse200Item.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[ListWorkspacesResponse200Item]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + *, + client: Client, +) -> Response[List[ListWorkspacesResponse200Item]]: + """list all workspaces visible to me + + Returns: + Response[List[ListWorkspacesResponse200Item]] + """ + + kwargs = _get_kwargs( + client=client, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + *, + client: Client, +) -> Optional[List[ListWorkspacesResponse200Item]]: + """list all workspaces visible to me + + Returns: + Response[List[ListWorkspacesResponse200Item]] + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: Client, +) -> Response[List[ListWorkspacesResponse200Item]]: + """list all workspaces visible to me + + Returns: + Response[List[ListWorkspacesResponse200Item]] + """ + + kwargs = _get_kwargs( + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + *, + client: Client, +) -> Optional[List[ListWorkspacesResponse200Item]]: + """list all workspaces visible to me + + Returns: + Response[List[ListWorkspacesResponse200Item]] + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/api/workspace/list_workspaces_as_super_admin.py b/python-client/windmill-api/windmill_api/api/workspace/list_workspaces_as_super_admin.py new file mode 100644 index 0000000000..ba35926dfd --- /dev/null +++ b/python-client/windmill-api/windmill_api/api/workspace/list_workspaces_as_super_admin.py @@ -0,0 +1,163 @@ +from typing import Any, Dict, List, Optional, Union + +import httpx + +from ...client import Client +from ...models.list_workspaces_as_super_admin_response_200_item import ListWorkspacesAsSuperAdminResponse200Item +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Dict[str, Any]: + url = "{}/workspaces/list_as_superadmin".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + params: Dict[str, Any] = {} + params["page"] = page + + params["per_page"] = per_page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "params": params, + } + + +def _parse_response(*, response: httpx.Response) -> Optional[List[ListWorkspacesAsSuperAdminResponse200Item]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = ListWorkspacesAsSuperAdminResponse200Item.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + return None + + +def _build_response(*, response: httpx.Response) -> Response[List[ListWorkspacesAsSuperAdminResponse200Item]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Response[List[ListWorkspacesAsSuperAdminResponse200Item]]: + """list all workspaces as super admin (require to be super admin) + + Args: + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + + Returns: + Response[List[ListWorkspacesAsSuperAdminResponse200Item]] + """ + + kwargs = _get_kwargs( + client=client, + page=page, + per_page=per_page, + ) + + response = httpx.request( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Optional[List[ListWorkspacesAsSuperAdminResponse200Item]]: + """list all workspaces as super admin (require to be super admin) + + Args: + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + + Returns: + Response[List[ListWorkspacesAsSuperAdminResponse200Item]] + """ + + return sync_detailed( + client=client, + page=page, + per_page=per_page, + ).parsed + + +async def asyncio_detailed( + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Response[List[ListWorkspacesAsSuperAdminResponse200Item]]: + """list all workspaces as super admin (require to be super admin) + + Args: + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + + Returns: + Response[List[ListWorkspacesAsSuperAdminResponse200Item]] + """ + + kwargs = _get_kwargs( + client=client, + page=page, + per_page=per_page, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.request(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + *, + client: Client, + page: Union[Unset, None, int] = UNSET, + per_page: Union[Unset, None, int] = UNSET, +) -> Optional[List[ListWorkspacesAsSuperAdminResponse200Item]]: + """list all workspaces as super admin (require to be super admin) + + Args: + page (Union[Unset, None, int]): + per_page (Union[Unset, None, int]): + + Returns: + Response[List[ListWorkspacesAsSuperAdminResponse200Item]] + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + per_page=per_page, + ) + ).parsed diff --git a/python-client/windmill-api/windmill_api/client.py b/python-client/windmill-api/windmill_api/client.py new file mode 100644 index 0000000000..9d36709880 --- /dev/null +++ b/python-client/windmill-api/windmill_api/client.py @@ -0,0 +1,48 @@ +import ssl +from typing import Dict, Union + +import attr + + +@attr.s(auto_attribs=True) +class Client: + """A class for keeping track of data related to the API""" + + base_url: str + cookies: Dict[str, str] = attr.ib(factory=dict, kw_only=True) + headers: Dict[str, str] = attr.ib(factory=dict, kw_only=True) + timeout: float = attr.ib(5.0, kw_only=True) + verify_ssl: Union[str, bool, ssl.SSLContext] = attr.ib(True, kw_only=True) + + def get_headers(self) -> Dict[str, str]: + """Get headers to be used in all endpoints""" + return {**self.headers} + + def with_headers(self, headers: Dict[str, str]) -> "Client": + """Get a new client matching this one with additional headers""" + return attr.evolve(self, headers={**self.headers, **headers}) + + def get_cookies(self) -> Dict[str, str]: + return {**self.cookies} + + def with_cookies(self, cookies: Dict[str, str]) -> "Client": + """Get a new client matching this one with additional cookies""" + return attr.evolve(self, cookies={**self.cookies, **cookies}) + + def get_timeout(self) -> float: + return self.timeout + + def with_timeout(self, timeout: float) -> "Client": + """Get a new client matching this one with a new timeout (in seconds)""" + return attr.evolve(self, timeout=timeout) + + +@attr.s(auto_attribs=True) +class AuthenticatedClient(Client): + """A Client which has been authenticated for use on secured endpoints""" + + token: str + + def get_headers(self) -> Dict[str, str]: + """Get headers to be used in authenticated endpoints""" + return {"Authorization": f"Bearer {self.token}", **self.headers} diff --git a/python-client/windmill-api/windmill_api/models/__init__.py b/python-client/windmill-api/windmill_api/models/__init__.py new file mode 100644 index 0000000000..524c38d6cb --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/__init__.py @@ -0,0 +1,2409 @@ +""" Contains all the data models used in inputs/outputs """ + +from .accept_invite_json_body import AcceptInviteJsonBody +from .add_granular_acls_json_body import AddGranularAclsJsonBody +from .add_granular_acls_kind import AddGranularAclsKind +from .add_user_to_group_json_body import AddUserToGroupJsonBody +from .archive_script_by_hash_response_200 import ArchiveScriptByHashResponse200 +from .archive_script_by_hash_response_200_extra_perms import ArchiveScriptByHashResponse200ExtraPerms +from .archive_script_by_hash_response_200_kind import ArchiveScriptByHashResponse200Kind +from .archive_script_by_hash_response_200_language import ArchiveScriptByHashResponse200Language +from .archive_script_by_hash_response_200_schema import ArchiveScriptByHashResponse200Schema +from .audit_log import AuditLog +from .audit_log_action_kind import AuditLogActionKind +from .audit_log_operation import AuditLogOperation +from .audit_log_parameters import AuditLogParameters +from .cancel_queued_job_json_body import CancelQueuedJobJsonBody +from .cancel_suspended_job_json_body import CancelSuspendedJobJsonBody +from .cancel_suspended_job_payload import CancelSuspendedJobPayload +from .completed_job import CompletedJob +from .completed_job_args import CompletedJobArgs +from .completed_job_flow_status import CompletedJobFlowStatus +from .completed_job_flow_status_failure_module import CompletedJobFlowStatusFailureModule +from .completed_job_flow_status_failure_module_iterator import CompletedJobFlowStatusFailureModuleIterator +from .completed_job_flow_status_failure_module_type import CompletedJobFlowStatusFailureModuleType +from .completed_job_flow_status_modules_item import CompletedJobFlowStatusModulesItem +from .completed_job_flow_status_modules_item_iterator import CompletedJobFlowStatusModulesItemIterator +from .completed_job_flow_status_modules_item_type import CompletedJobFlowStatusModulesItemType +from .completed_job_flow_status_retry import CompletedJobFlowStatusRetry +from .completed_job_job_kind import CompletedJobJobKind +from .completed_job_language import CompletedJobLanguage +from .completed_job_raw_flow import CompletedJobRawFlow +from .completed_job_raw_flow_failure_module import CompletedJobRawFlowFailureModule +from .completed_job_raw_flow_failure_module_input_transforms import CompletedJobRawFlowFailureModuleInputTransforms +from .completed_job_raw_flow_failure_module_input_transforms_additional_property_type_0 import ( + CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0, +) +from .completed_job_raw_flow_failure_module_input_transforms_additional_property_type_0_type import ( + CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from .completed_job_raw_flow_failure_module_input_transforms_additional_property_type_1 import ( + CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1, +) +from .completed_job_raw_flow_failure_module_input_transforms_additional_property_type_1_type import ( + CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type, +) +from .completed_job_raw_flow_failure_module_retry import CompletedJobRawFlowFailureModuleRetry +from .completed_job_raw_flow_failure_module_retry_constant import CompletedJobRawFlowFailureModuleRetryConstant +from .completed_job_raw_flow_failure_module_retry_exponential import CompletedJobRawFlowFailureModuleRetryExponential +from .completed_job_raw_flow_failure_module_sleep_type_0 import CompletedJobRawFlowFailureModuleSleepType0 +from .completed_job_raw_flow_failure_module_sleep_type_0_type import CompletedJobRawFlowFailureModuleSleepType0Type +from .completed_job_raw_flow_failure_module_sleep_type_1 import CompletedJobRawFlowFailureModuleSleepType1 +from .completed_job_raw_flow_failure_module_sleep_type_1_type import CompletedJobRawFlowFailureModuleSleepType1Type +from .completed_job_raw_flow_failure_module_stop_after_if import CompletedJobRawFlowFailureModuleStopAfterIf +from .completed_job_raw_flow_failure_module_value_type_0 import CompletedJobRawFlowFailureModuleValueType0 +from .completed_job_raw_flow_failure_module_value_type_0_language import ( + CompletedJobRawFlowFailureModuleValueType0Language, +) +from .completed_job_raw_flow_failure_module_value_type_1 import CompletedJobRawFlowFailureModuleValueType1 +from .completed_job_raw_flow_failure_module_value_type_1_type import CompletedJobRawFlowFailureModuleValueType1Type +from .completed_job_raw_flow_failure_module_value_type_2 import CompletedJobRawFlowFailureModuleValueType2 +from .completed_job_raw_flow_failure_module_value_type_2_iterator_type_0 import ( + CompletedJobRawFlowFailureModuleValueType2IteratorType0, +) +from .completed_job_raw_flow_failure_module_value_type_2_iterator_type_0_type import ( + CompletedJobRawFlowFailureModuleValueType2IteratorType0Type, +) +from .completed_job_raw_flow_failure_module_value_type_2_iterator_type_1 import ( + CompletedJobRawFlowFailureModuleValueType2IteratorType1, +) +from .completed_job_raw_flow_failure_module_value_type_2_iterator_type_1_type import ( + CompletedJobRawFlowFailureModuleValueType2IteratorType1Type, +) +from .completed_job_raw_flow_failure_module_value_type_2_type import CompletedJobRawFlowFailureModuleValueType2Type +from .completed_job_raw_flow_failure_module_value_type_3 import CompletedJobRawFlowFailureModuleValueType3 +from .completed_job_raw_flow_failure_module_value_type_3_type import CompletedJobRawFlowFailureModuleValueType3Type +from .completed_job_raw_flow_modules_item import CompletedJobRawFlowModulesItem +from .completed_job_raw_flow_modules_item_input_transforms import CompletedJobRawFlowModulesItemInputTransforms +from .completed_job_raw_flow_modules_item_input_transforms_additional_property_type_0 import ( + CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0, +) +from .completed_job_raw_flow_modules_item_input_transforms_additional_property_type_0_type import ( + CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0Type, +) +from .completed_job_raw_flow_modules_item_input_transforms_additional_property_type_1 import ( + CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1, +) +from .completed_job_raw_flow_modules_item_input_transforms_additional_property_type_1_type import ( + CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1Type, +) +from .completed_job_raw_flow_modules_item_retry import CompletedJobRawFlowModulesItemRetry +from .completed_job_raw_flow_modules_item_retry_constant import CompletedJobRawFlowModulesItemRetryConstant +from .completed_job_raw_flow_modules_item_retry_exponential import CompletedJobRawFlowModulesItemRetryExponential +from .completed_job_raw_flow_modules_item_sleep_type_0 import CompletedJobRawFlowModulesItemSleepType0 +from .completed_job_raw_flow_modules_item_sleep_type_0_type import CompletedJobRawFlowModulesItemSleepType0Type +from .completed_job_raw_flow_modules_item_sleep_type_1 import CompletedJobRawFlowModulesItemSleepType1 +from .completed_job_raw_flow_modules_item_sleep_type_1_type import CompletedJobRawFlowModulesItemSleepType1Type +from .completed_job_raw_flow_modules_item_stop_after_if import CompletedJobRawFlowModulesItemStopAfterIf +from .completed_job_raw_flow_modules_item_value_type_0 import CompletedJobRawFlowModulesItemValueType0 +from .completed_job_raw_flow_modules_item_value_type_0_language import CompletedJobRawFlowModulesItemValueType0Language +from .completed_job_raw_flow_modules_item_value_type_1 import CompletedJobRawFlowModulesItemValueType1 +from .completed_job_raw_flow_modules_item_value_type_1_type import CompletedJobRawFlowModulesItemValueType1Type +from .completed_job_raw_flow_modules_item_value_type_2 import CompletedJobRawFlowModulesItemValueType2 +from .completed_job_raw_flow_modules_item_value_type_2_iterator_type_0 import ( + CompletedJobRawFlowModulesItemValueType2IteratorType0, +) +from .completed_job_raw_flow_modules_item_value_type_2_iterator_type_0_type import ( + CompletedJobRawFlowModulesItemValueType2IteratorType0Type, +) +from .completed_job_raw_flow_modules_item_value_type_2_iterator_type_1 import ( + CompletedJobRawFlowModulesItemValueType2IteratorType1, +) +from .completed_job_raw_flow_modules_item_value_type_2_iterator_type_1_type import ( + CompletedJobRawFlowModulesItemValueType2IteratorType1Type, +) +from .completed_job_raw_flow_modules_item_value_type_2_type import CompletedJobRawFlowModulesItemValueType2Type +from .completed_job_raw_flow_modules_item_value_type_3 import CompletedJobRawFlowModulesItemValueType3 +from .completed_job_raw_flow_modules_item_value_type_3_type import CompletedJobRawFlowModulesItemValueType3Type +from .completed_job_result import CompletedJobResult +from .connect_callback_json_body import ConnectCallbackJsonBody +from .connect_callback_response_200 import ConnectCallbackResponse200 +from .connect_slack_callback_json_body import ConnectSlackCallbackJsonBody +from .connect_slack_callback_response_200 import ConnectSlackCallbackResponse200 +from .connect_slack_callback_response_200_bot import ConnectSlackCallbackResponse200Bot +from .contextual_variable import ContextualVariable +from .create_account_json_body import CreateAccountJsonBody +from .create_flow_json_body import CreateFlowJsonBody +from .create_flow_json_body_schema import CreateFlowJsonBodySchema +from .create_flow_json_body_value import CreateFlowJsonBodyValue +from .create_flow_json_body_value_failure_module import CreateFlowJsonBodyValueFailureModule +from .create_flow_json_body_value_failure_module_input_transforms import ( + CreateFlowJsonBodyValueFailureModuleInputTransforms, +) +from .create_flow_json_body_value_failure_module_input_transforms_additional_property_type_0 import ( + CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0, +) +from .create_flow_json_body_value_failure_module_input_transforms_additional_property_type_0_type import ( + CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from .create_flow_json_body_value_failure_module_input_transforms_additional_property_type_1 import ( + CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1, +) +from .create_flow_json_body_value_failure_module_input_transforms_additional_property_type_1_type import ( + CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1Type, +) +from .create_flow_json_body_value_failure_module_retry import CreateFlowJsonBodyValueFailureModuleRetry +from .create_flow_json_body_value_failure_module_retry_constant import CreateFlowJsonBodyValueFailureModuleRetryConstant +from .create_flow_json_body_value_failure_module_retry_exponential import ( + CreateFlowJsonBodyValueFailureModuleRetryExponential, +) +from .create_flow_json_body_value_failure_module_sleep_type_0 import CreateFlowJsonBodyValueFailureModuleSleepType0 +from .create_flow_json_body_value_failure_module_sleep_type_0_type import ( + CreateFlowJsonBodyValueFailureModuleSleepType0Type, +) +from .create_flow_json_body_value_failure_module_sleep_type_1 import CreateFlowJsonBodyValueFailureModuleSleepType1 +from .create_flow_json_body_value_failure_module_sleep_type_1_type import ( + CreateFlowJsonBodyValueFailureModuleSleepType1Type, +) +from .create_flow_json_body_value_failure_module_stop_after_if import CreateFlowJsonBodyValueFailureModuleStopAfterIf +from .create_flow_json_body_value_failure_module_value_type_0 import CreateFlowJsonBodyValueFailureModuleValueType0 +from .create_flow_json_body_value_failure_module_value_type_0_language import ( + CreateFlowJsonBodyValueFailureModuleValueType0Language, +) +from .create_flow_json_body_value_failure_module_value_type_1 import CreateFlowJsonBodyValueFailureModuleValueType1 +from .create_flow_json_body_value_failure_module_value_type_1_type import ( + CreateFlowJsonBodyValueFailureModuleValueType1Type, +) +from .create_flow_json_body_value_failure_module_value_type_2 import CreateFlowJsonBodyValueFailureModuleValueType2 +from .create_flow_json_body_value_failure_module_value_type_2_iterator_type_0 import ( + CreateFlowJsonBodyValueFailureModuleValueType2IteratorType0, +) +from .create_flow_json_body_value_failure_module_value_type_2_iterator_type_0_type import ( + CreateFlowJsonBodyValueFailureModuleValueType2IteratorType0Type, +) +from .create_flow_json_body_value_failure_module_value_type_2_iterator_type_1 import ( + CreateFlowJsonBodyValueFailureModuleValueType2IteratorType1, +) +from .create_flow_json_body_value_failure_module_value_type_2_iterator_type_1_type import ( + CreateFlowJsonBodyValueFailureModuleValueType2IteratorType1Type, +) +from .create_flow_json_body_value_failure_module_value_type_2_type import ( + CreateFlowJsonBodyValueFailureModuleValueType2Type, +) +from .create_flow_json_body_value_failure_module_value_type_3 import CreateFlowJsonBodyValueFailureModuleValueType3 +from .create_flow_json_body_value_failure_module_value_type_3_type import ( + CreateFlowJsonBodyValueFailureModuleValueType3Type, +) +from .create_flow_json_body_value_modules_item import CreateFlowJsonBodyValueModulesItem +from .create_flow_json_body_value_modules_item_input_transforms import CreateFlowJsonBodyValueModulesItemInputTransforms +from .create_flow_json_body_value_modules_item_input_transforms_additional_property_type_0 import ( + CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0, +) +from .create_flow_json_body_value_modules_item_input_transforms_additional_property_type_0_type import ( + CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0Type, +) +from .create_flow_json_body_value_modules_item_input_transforms_additional_property_type_1 import ( + CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1, +) +from .create_flow_json_body_value_modules_item_input_transforms_additional_property_type_1_type import ( + CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1Type, +) +from .create_flow_json_body_value_modules_item_retry import CreateFlowJsonBodyValueModulesItemRetry +from .create_flow_json_body_value_modules_item_retry_constant import CreateFlowJsonBodyValueModulesItemRetryConstant +from .create_flow_json_body_value_modules_item_retry_exponential import ( + CreateFlowJsonBodyValueModulesItemRetryExponential, +) +from .create_flow_json_body_value_modules_item_sleep_type_0 import CreateFlowJsonBodyValueModulesItemSleepType0 +from .create_flow_json_body_value_modules_item_sleep_type_0_type import CreateFlowJsonBodyValueModulesItemSleepType0Type +from .create_flow_json_body_value_modules_item_sleep_type_1 import CreateFlowJsonBodyValueModulesItemSleepType1 +from .create_flow_json_body_value_modules_item_sleep_type_1_type import CreateFlowJsonBodyValueModulesItemSleepType1Type +from .create_flow_json_body_value_modules_item_stop_after_if import CreateFlowJsonBodyValueModulesItemStopAfterIf +from .create_flow_json_body_value_modules_item_value_type_0 import CreateFlowJsonBodyValueModulesItemValueType0 +from .create_flow_json_body_value_modules_item_value_type_0_language import ( + CreateFlowJsonBodyValueModulesItemValueType0Language, +) +from .create_flow_json_body_value_modules_item_value_type_1 import CreateFlowJsonBodyValueModulesItemValueType1 +from .create_flow_json_body_value_modules_item_value_type_1_type import CreateFlowJsonBodyValueModulesItemValueType1Type +from .create_flow_json_body_value_modules_item_value_type_2 import CreateFlowJsonBodyValueModulesItemValueType2 +from .create_flow_json_body_value_modules_item_value_type_2_iterator_type_0 import ( + CreateFlowJsonBodyValueModulesItemValueType2IteratorType0, +) +from .create_flow_json_body_value_modules_item_value_type_2_iterator_type_0_type import ( + CreateFlowJsonBodyValueModulesItemValueType2IteratorType0Type, +) +from .create_flow_json_body_value_modules_item_value_type_2_iterator_type_1 import ( + CreateFlowJsonBodyValueModulesItemValueType2IteratorType1, +) +from .create_flow_json_body_value_modules_item_value_type_2_iterator_type_1_type import ( + CreateFlowJsonBodyValueModulesItemValueType2IteratorType1Type, +) +from .create_flow_json_body_value_modules_item_value_type_2_type import CreateFlowJsonBodyValueModulesItemValueType2Type +from .create_flow_json_body_value_modules_item_value_type_3 import CreateFlowJsonBodyValueModulesItemValueType3 +from .create_flow_json_body_value_modules_item_value_type_3_type import CreateFlowJsonBodyValueModulesItemValueType3Type +from .create_group_json_body import CreateGroupJsonBody +from .create_resource import CreateResource +from .create_resource_json_body import CreateResourceJsonBody +from .create_resource_json_body_value import CreateResourceJsonBodyValue +from .create_resource_type_json_body import CreateResourceTypeJsonBody +from .create_resource_value import CreateResourceValue +from .create_schedule_json_body import CreateScheduleJsonBody +from .create_schedule_json_body_args import CreateScheduleJsonBodyArgs +from .create_script_json_body import CreateScriptJsonBody +from .create_script_json_body_kind import CreateScriptJsonBodyKind +from .create_script_json_body_language import CreateScriptJsonBodyLanguage +from .create_script_json_body_schema import CreateScriptJsonBodySchema +from .create_token_json_body import CreateTokenJsonBody +from .create_user_globally_json_body import CreateUserGloballyJsonBody +from .create_user_json_body import CreateUserJsonBody +from .create_variable import CreateVariable +from .create_variable_json_body import CreateVariableJsonBody +from .create_workspace import CreateWorkspace +from .create_workspace_json_body import CreateWorkspaceJsonBody +from .decline_invite_json_body import DeclineInviteJsonBody +from .delete_completed_job_response_200 import DeleteCompletedJobResponse200 +from .delete_completed_job_response_200_args import DeleteCompletedJobResponse200Args +from .delete_completed_job_response_200_flow_status import DeleteCompletedJobResponse200FlowStatus +from .delete_completed_job_response_200_flow_status_failure_module import ( + DeleteCompletedJobResponse200FlowStatusFailureModule, +) +from .delete_completed_job_response_200_flow_status_failure_module_iterator import ( + DeleteCompletedJobResponse200FlowStatusFailureModuleIterator, +) +from .delete_completed_job_response_200_flow_status_failure_module_type import ( + DeleteCompletedJobResponse200FlowStatusFailureModuleType, +) +from .delete_completed_job_response_200_flow_status_modules_item import ( + DeleteCompletedJobResponse200FlowStatusModulesItem, +) +from .delete_completed_job_response_200_flow_status_modules_item_iterator import ( + DeleteCompletedJobResponse200FlowStatusModulesItemIterator, +) +from .delete_completed_job_response_200_flow_status_modules_item_type import ( + DeleteCompletedJobResponse200FlowStatusModulesItemType, +) +from .delete_completed_job_response_200_flow_status_retry import DeleteCompletedJobResponse200FlowStatusRetry +from .delete_completed_job_response_200_job_kind import DeleteCompletedJobResponse200JobKind +from .delete_completed_job_response_200_language import DeleteCompletedJobResponse200Language +from .delete_completed_job_response_200_raw_flow import DeleteCompletedJobResponse200RawFlow +from .delete_completed_job_response_200_raw_flow_failure_module import DeleteCompletedJobResponse200RawFlowFailureModule +from .delete_completed_job_response_200_raw_flow_failure_module_input_transforms import ( + DeleteCompletedJobResponse200RawFlowFailureModuleInputTransforms, +) +from .delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0 import ( + DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0, +) +from .delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0_type import ( + DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from .delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1 import ( + DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1, +) +from .delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1_type import ( + DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1Type, +) +from .delete_completed_job_response_200_raw_flow_failure_module_retry import ( + DeleteCompletedJobResponse200RawFlowFailureModuleRetry, +) +from .delete_completed_job_response_200_raw_flow_failure_module_retry_constant import ( + DeleteCompletedJobResponse200RawFlowFailureModuleRetryConstant, +) +from .delete_completed_job_response_200_raw_flow_failure_module_retry_exponential import ( + DeleteCompletedJobResponse200RawFlowFailureModuleRetryExponential, +) +from .delete_completed_job_response_200_raw_flow_failure_module_sleep_type_0 import ( + DeleteCompletedJobResponse200RawFlowFailureModuleSleepType0, +) +from .delete_completed_job_response_200_raw_flow_failure_module_sleep_type_0_type import ( + DeleteCompletedJobResponse200RawFlowFailureModuleSleepType0Type, +) +from .delete_completed_job_response_200_raw_flow_failure_module_sleep_type_1 import ( + DeleteCompletedJobResponse200RawFlowFailureModuleSleepType1, +) +from .delete_completed_job_response_200_raw_flow_failure_module_sleep_type_1_type import ( + DeleteCompletedJobResponse200RawFlowFailureModuleSleepType1Type, +) +from .delete_completed_job_response_200_raw_flow_failure_module_stop_after_if import ( + DeleteCompletedJobResponse200RawFlowFailureModuleStopAfterIf, +) +from .delete_completed_job_response_200_raw_flow_failure_module_value_type_0 import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType0, +) +from .delete_completed_job_response_200_raw_flow_failure_module_value_type_0_language import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType0Language, +) +from .delete_completed_job_response_200_raw_flow_failure_module_value_type_1 import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType1, +) +from .delete_completed_job_response_200_raw_flow_failure_module_value_type_1_type import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType1Type, +) +from .delete_completed_job_response_200_raw_flow_failure_module_value_type_2 import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType2, +) +from .delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0 import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0, +) +from .delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0_type import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0Type, +) +from .delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1 import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1, +) +from .delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1_type import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1Type, +) +from .delete_completed_job_response_200_raw_flow_failure_module_value_type_2_type import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType2Type, +) +from .delete_completed_job_response_200_raw_flow_failure_module_value_type_3 import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType3, +) +from .delete_completed_job_response_200_raw_flow_failure_module_value_type_3_type import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType3Type, +) +from .delete_completed_job_response_200_raw_flow_modules_item import DeleteCompletedJobResponse200RawFlowModulesItem +from .delete_completed_job_response_200_raw_flow_modules_item_input_transforms import ( + DeleteCompletedJobResponse200RawFlowModulesItemInputTransforms, +) +from .delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0 import ( + DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0, +) +from .delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0_type import ( + DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0Type, +) +from .delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1 import ( + DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1, +) +from .delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1_type import ( + DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1Type, +) +from .delete_completed_job_response_200_raw_flow_modules_item_retry import ( + DeleteCompletedJobResponse200RawFlowModulesItemRetry, +) +from .delete_completed_job_response_200_raw_flow_modules_item_retry_constant import ( + DeleteCompletedJobResponse200RawFlowModulesItemRetryConstant, +) +from .delete_completed_job_response_200_raw_flow_modules_item_retry_exponential import ( + DeleteCompletedJobResponse200RawFlowModulesItemRetryExponential, +) +from .delete_completed_job_response_200_raw_flow_modules_item_sleep_type_0 import ( + DeleteCompletedJobResponse200RawFlowModulesItemSleepType0, +) +from .delete_completed_job_response_200_raw_flow_modules_item_sleep_type_0_type import ( + DeleteCompletedJobResponse200RawFlowModulesItemSleepType0Type, +) +from .delete_completed_job_response_200_raw_flow_modules_item_sleep_type_1 import ( + DeleteCompletedJobResponse200RawFlowModulesItemSleepType1, +) +from .delete_completed_job_response_200_raw_flow_modules_item_sleep_type_1_type import ( + DeleteCompletedJobResponse200RawFlowModulesItemSleepType1Type, +) +from .delete_completed_job_response_200_raw_flow_modules_item_stop_after_if import ( + DeleteCompletedJobResponse200RawFlowModulesItemStopAfterIf, +) +from .delete_completed_job_response_200_raw_flow_modules_item_value_type_0 import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType0, +) +from .delete_completed_job_response_200_raw_flow_modules_item_value_type_0_language import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType0Language, +) +from .delete_completed_job_response_200_raw_flow_modules_item_value_type_1 import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType1, +) +from .delete_completed_job_response_200_raw_flow_modules_item_value_type_1_type import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType1Type, +) +from .delete_completed_job_response_200_raw_flow_modules_item_value_type_2 import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType2, +) +from .delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0 import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0, +) +from .delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0_type import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0Type, +) +from .delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1 import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1, +) +from .delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1_type import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1Type, +) +from .delete_completed_job_response_200_raw_flow_modules_item_value_type_2_type import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType2Type, +) +from .delete_completed_job_response_200_raw_flow_modules_item_value_type_3 import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType3, +) +from .delete_completed_job_response_200_raw_flow_modules_item_value_type_3_type import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType3Type, +) +from .delete_completed_job_response_200_result import DeleteCompletedJobResponse200Result +from .delete_invite_json_body import DeleteInviteJsonBody +from .delete_script_by_hash_response_200 import DeleteScriptByHashResponse200 +from .delete_script_by_hash_response_200_extra_perms import DeleteScriptByHashResponse200ExtraPerms +from .delete_script_by_hash_response_200_kind import DeleteScriptByHashResponse200Kind +from .delete_script_by_hash_response_200_language import DeleteScriptByHashResponse200Language +from .delete_script_by_hash_response_200_schema import DeleteScriptByHashResponse200Schema +from .deno_to_jsonschema_response_200 import DenoToJsonschemaResponse200 +from .deno_to_jsonschema_response_200_args_item import DenoToJsonschemaResponse200ArgsItem +from .deno_to_jsonschema_response_200_args_item_typ_type_0 import DenoToJsonschemaResponse200ArgsItemTypType0 +from .deno_to_jsonschema_response_200_args_item_typ_type_1 import DenoToJsonschemaResponse200ArgsItemTypType1 +from .deno_to_jsonschema_response_200_args_item_typ_type_2 import DenoToJsonschemaResponse200ArgsItemTypType2 +from .deno_to_jsonschema_response_200_args_item_typ_type_3 import DenoToJsonschemaResponse200ArgsItemTypType3 +from .deno_to_jsonschema_response_200_args_item_typ_type_3_object_item import ( + DenoToJsonschemaResponse200ArgsItemTypType3ObjectItem, +) +from .deno_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_0 import ( + DenoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0, +) +from .deno_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1 import ( + DenoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1, +) +from .deno_to_jsonschema_response_200_args_item_typ_type_4 import DenoToJsonschemaResponse200ArgsItemTypType4 +from .deno_to_jsonschema_response_200_args_item_typ_type_4_list_type_0 import ( + DenoToJsonschemaResponse200ArgsItemTypType4ListType0, +) +from .deno_to_jsonschema_response_200_args_item_typ_type_4_list_type_1 import ( + DenoToJsonschemaResponse200ArgsItemTypType4ListType1, +) +from .edit_resource import EditResource +from .edit_resource_type import EditResourceType +from .edit_resource_value import EditResourceValue +from .edit_schedule import EditSchedule +from .edit_schedule_args import EditScheduleArgs +from .edit_slack_command_json_body import EditSlackCommandJsonBody +from .edit_variable import EditVariable +from .edit_workspace_user import EditWorkspaceUser +from .exists_username_json_body import ExistsUsernameJsonBody +from .exists_workspace_json_body import ExistsWorkspaceJsonBody +from .flow import Flow +from .flow_extra_perms import FlowExtraPerms +from .flow_metadata import FlowMetadata +from .flow_metadata_extra_perms import FlowMetadataExtraPerms +from .flow_module import FlowModule +from .flow_module_input_transforms import FlowModuleInputTransforms +from .flow_module_input_transforms_additional_property_type_0 import FlowModuleInputTransformsAdditionalPropertyType0 +from .flow_module_input_transforms_additional_property_type_0_type import ( + FlowModuleInputTransformsAdditionalPropertyType0Type, +) +from .flow_module_input_transforms_additional_property_type_1 import FlowModuleInputTransformsAdditionalPropertyType1 +from .flow_module_input_transforms_additional_property_type_1_type import ( + FlowModuleInputTransformsAdditionalPropertyType1Type, +) +from .flow_module_retry import FlowModuleRetry +from .flow_module_retry_constant import FlowModuleRetryConstant +from .flow_module_retry_exponential import FlowModuleRetryExponential +from .flow_module_sleep_type_0 import FlowModuleSleepType0 +from .flow_module_sleep_type_0_type import FlowModuleSleepType0Type +from .flow_module_sleep_type_1 import FlowModuleSleepType1 +from .flow_module_sleep_type_1_type import FlowModuleSleepType1Type +from .flow_module_stop_after_if import FlowModuleStopAfterIf +from .flow_module_value_type_0 import FlowModuleValueType0 +from .flow_module_value_type_0_language import FlowModuleValueType0Language +from .flow_module_value_type_1 import FlowModuleValueType1 +from .flow_module_value_type_1_type import FlowModuleValueType1Type +from .flow_module_value_type_2 import FlowModuleValueType2 +from .flow_module_value_type_2_iterator_type_0 import FlowModuleValueType2IteratorType0 +from .flow_module_value_type_2_iterator_type_0_type import FlowModuleValueType2IteratorType0Type +from .flow_module_value_type_2_iterator_type_1 import FlowModuleValueType2IteratorType1 +from .flow_module_value_type_2_iterator_type_1_type import FlowModuleValueType2IteratorType1Type +from .flow_module_value_type_2_type import FlowModuleValueType2Type +from .flow_module_value_type_3 import FlowModuleValueType3 +from .flow_module_value_type_3_type import FlowModuleValueType3Type +from .flow_preview import FlowPreview +from .flow_preview_args import FlowPreviewArgs +from .flow_preview_value import FlowPreviewValue +from .flow_preview_value_failure_module import FlowPreviewValueFailureModule +from .flow_preview_value_failure_module_input_transforms import FlowPreviewValueFailureModuleInputTransforms +from .flow_preview_value_failure_module_input_transforms_additional_property_type_0 import ( + FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType0, +) +from .flow_preview_value_failure_module_input_transforms_additional_property_type_0_type import ( + FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from .flow_preview_value_failure_module_input_transforms_additional_property_type_1 import ( + FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType1, +) +from .flow_preview_value_failure_module_input_transforms_additional_property_type_1_type import ( + FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType1Type, +) +from .flow_preview_value_failure_module_retry import FlowPreviewValueFailureModuleRetry +from .flow_preview_value_failure_module_retry_constant import FlowPreviewValueFailureModuleRetryConstant +from .flow_preview_value_failure_module_retry_exponential import FlowPreviewValueFailureModuleRetryExponential +from .flow_preview_value_failure_module_sleep_type_0 import FlowPreviewValueFailureModuleSleepType0 +from .flow_preview_value_failure_module_sleep_type_0_type import FlowPreviewValueFailureModuleSleepType0Type +from .flow_preview_value_failure_module_sleep_type_1 import FlowPreviewValueFailureModuleSleepType1 +from .flow_preview_value_failure_module_sleep_type_1_type import FlowPreviewValueFailureModuleSleepType1Type +from .flow_preview_value_failure_module_stop_after_if import FlowPreviewValueFailureModuleStopAfterIf +from .flow_preview_value_failure_module_value_type_0 import FlowPreviewValueFailureModuleValueType0 +from .flow_preview_value_failure_module_value_type_0_language import FlowPreviewValueFailureModuleValueType0Language +from .flow_preview_value_failure_module_value_type_1 import FlowPreviewValueFailureModuleValueType1 +from .flow_preview_value_failure_module_value_type_1_type import FlowPreviewValueFailureModuleValueType1Type +from .flow_preview_value_failure_module_value_type_2 import FlowPreviewValueFailureModuleValueType2 +from .flow_preview_value_failure_module_value_type_2_iterator_type_0 import ( + FlowPreviewValueFailureModuleValueType2IteratorType0, +) +from .flow_preview_value_failure_module_value_type_2_iterator_type_0_type import ( + FlowPreviewValueFailureModuleValueType2IteratorType0Type, +) +from .flow_preview_value_failure_module_value_type_2_iterator_type_1 import ( + FlowPreviewValueFailureModuleValueType2IteratorType1, +) +from .flow_preview_value_failure_module_value_type_2_iterator_type_1_type import ( + FlowPreviewValueFailureModuleValueType2IteratorType1Type, +) +from .flow_preview_value_failure_module_value_type_2_type import FlowPreviewValueFailureModuleValueType2Type +from .flow_preview_value_failure_module_value_type_3 import FlowPreviewValueFailureModuleValueType3 +from .flow_preview_value_failure_module_value_type_3_type import FlowPreviewValueFailureModuleValueType3Type +from .flow_preview_value_modules_item import FlowPreviewValueModulesItem +from .flow_preview_value_modules_item_input_transforms import FlowPreviewValueModulesItemInputTransforms +from .flow_preview_value_modules_item_input_transforms_additional_property_type_0 import ( + FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType0, +) +from .flow_preview_value_modules_item_input_transforms_additional_property_type_0_type import ( + FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType0Type, +) +from .flow_preview_value_modules_item_input_transforms_additional_property_type_1 import ( + FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType1, +) +from .flow_preview_value_modules_item_input_transforms_additional_property_type_1_type import ( + FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType1Type, +) +from .flow_preview_value_modules_item_retry import FlowPreviewValueModulesItemRetry +from .flow_preview_value_modules_item_retry_constant import FlowPreviewValueModulesItemRetryConstant +from .flow_preview_value_modules_item_retry_exponential import FlowPreviewValueModulesItemRetryExponential +from .flow_preview_value_modules_item_sleep_type_0 import FlowPreviewValueModulesItemSleepType0 +from .flow_preview_value_modules_item_sleep_type_0_type import FlowPreviewValueModulesItemSleepType0Type +from .flow_preview_value_modules_item_sleep_type_1 import FlowPreviewValueModulesItemSleepType1 +from .flow_preview_value_modules_item_sleep_type_1_type import FlowPreviewValueModulesItemSleepType1Type +from .flow_preview_value_modules_item_stop_after_if import FlowPreviewValueModulesItemStopAfterIf +from .flow_preview_value_modules_item_value_type_0 import FlowPreviewValueModulesItemValueType0 +from .flow_preview_value_modules_item_value_type_0_language import FlowPreviewValueModulesItemValueType0Language +from .flow_preview_value_modules_item_value_type_1 import FlowPreviewValueModulesItemValueType1 +from .flow_preview_value_modules_item_value_type_1_type import FlowPreviewValueModulesItemValueType1Type +from .flow_preview_value_modules_item_value_type_2 import FlowPreviewValueModulesItemValueType2 +from .flow_preview_value_modules_item_value_type_2_iterator_type_0 import ( + FlowPreviewValueModulesItemValueType2IteratorType0, +) +from .flow_preview_value_modules_item_value_type_2_iterator_type_0_type import ( + FlowPreviewValueModulesItemValueType2IteratorType0Type, +) +from .flow_preview_value_modules_item_value_type_2_iterator_type_1 import ( + FlowPreviewValueModulesItemValueType2IteratorType1, +) +from .flow_preview_value_modules_item_value_type_2_iterator_type_1_type import ( + FlowPreviewValueModulesItemValueType2IteratorType1Type, +) +from .flow_preview_value_modules_item_value_type_2_type import FlowPreviewValueModulesItemValueType2Type +from .flow_preview_value_modules_item_value_type_3 import FlowPreviewValueModulesItemValueType3 +from .flow_preview_value_modules_item_value_type_3_type import FlowPreviewValueModulesItemValueType3Type +from .flow_schema import FlowSchema +from .flow_status import FlowStatus +from .flow_status_failure_module import FlowStatusFailureModule +from .flow_status_failure_module_iterator import FlowStatusFailureModuleIterator +from .flow_status_failure_module_type import FlowStatusFailureModuleType +from .flow_status_module import FlowStatusModule +from .flow_status_module_iterator import FlowStatusModuleIterator +from .flow_status_module_type import FlowStatusModuleType +from .flow_status_modules_item import FlowStatusModulesItem +from .flow_status_modules_item_iterator import FlowStatusModulesItemIterator +from .flow_status_modules_item_type import FlowStatusModulesItemType +from .flow_status_retry import FlowStatusRetry +from .flow_value import FlowValue +from .flow_value_failure_module import FlowValueFailureModule +from .flow_value_failure_module_input_transforms import FlowValueFailureModuleInputTransforms +from .flow_value_failure_module_input_transforms_additional_property_type_0 import ( + FlowValueFailureModuleInputTransformsAdditionalPropertyType0, +) +from .flow_value_failure_module_input_transforms_additional_property_type_0_type import ( + FlowValueFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from .flow_value_failure_module_input_transforms_additional_property_type_1 import ( + FlowValueFailureModuleInputTransformsAdditionalPropertyType1, +) +from .flow_value_failure_module_input_transforms_additional_property_type_1_type import ( + FlowValueFailureModuleInputTransformsAdditionalPropertyType1Type, +) +from .flow_value_failure_module_retry import FlowValueFailureModuleRetry +from .flow_value_failure_module_retry_constant import FlowValueFailureModuleRetryConstant +from .flow_value_failure_module_retry_exponential import FlowValueFailureModuleRetryExponential +from .flow_value_failure_module_sleep_type_0 import FlowValueFailureModuleSleepType0 +from .flow_value_failure_module_sleep_type_0_type import FlowValueFailureModuleSleepType0Type +from .flow_value_failure_module_sleep_type_1 import FlowValueFailureModuleSleepType1 +from .flow_value_failure_module_sleep_type_1_type import FlowValueFailureModuleSleepType1Type +from .flow_value_failure_module_stop_after_if import FlowValueFailureModuleStopAfterIf +from .flow_value_failure_module_value_type_0 import FlowValueFailureModuleValueType0 +from .flow_value_failure_module_value_type_0_language import FlowValueFailureModuleValueType0Language +from .flow_value_failure_module_value_type_1 import FlowValueFailureModuleValueType1 +from .flow_value_failure_module_value_type_1_type import FlowValueFailureModuleValueType1Type +from .flow_value_failure_module_value_type_2 import FlowValueFailureModuleValueType2 +from .flow_value_failure_module_value_type_2_iterator_type_0 import FlowValueFailureModuleValueType2IteratorType0 +from .flow_value_failure_module_value_type_2_iterator_type_0_type import ( + FlowValueFailureModuleValueType2IteratorType0Type, +) +from .flow_value_failure_module_value_type_2_iterator_type_1 import FlowValueFailureModuleValueType2IteratorType1 +from .flow_value_failure_module_value_type_2_iterator_type_1_type import ( + FlowValueFailureModuleValueType2IteratorType1Type, +) +from .flow_value_failure_module_value_type_2_type import FlowValueFailureModuleValueType2Type +from .flow_value_failure_module_value_type_3 import FlowValueFailureModuleValueType3 +from .flow_value_failure_module_value_type_3_type import FlowValueFailureModuleValueType3Type +from .flow_value_modules_item import FlowValueModulesItem +from .flow_value_modules_item_input_transforms import FlowValueModulesItemInputTransforms +from .flow_value_modules_item_input_transforms_additional_property_type_0 import ( + FlowValueModulesItemInputTransformsAdditionalPropertyType0, +) +from .flow_value_modules_item_input_transforms_additional_property_type_0_type import ( + FlowValueModulesItemInputTransformsAdditionalPropertyType0Type, +) +from .flow_value_modules_item_input_transforms_additional_property_type_1 import ( + FlowValueModulesItemInputTransformsAdditionalPropertyType1, +) +from .flow_value_modules_item_input_transforms_additional_property_type_1_type import ( + FlowValueModulesItemInputTransformsAdditionalPropertyType1Type, +) +from .flow_value_modules_item_retry import FlowValueModulesItemRetry +from .flow_value_modules_item_retry_constant import FlowValueModulesItemRetryConstant +from .flow_value_modules_item_retry_exponential import FlowValueModulesItemRetryExponential +from .flow_value_modules_item_sleep_type_0 import FlowValueModulesItemSleepType0 +from .flow_value_modules_item_sleep_type_0_type import FlowValueModulesItemSleepType0Type +from .flow_value_modules_item_sleep_type_1 import FlowValueModulesItemSleepType1 +from .flow_value_modules_item_sleep_type_1_type import FlowValueModulesItemSleepType1Type +from .flow_value_modules_item_stop_after_if import FlowValueModulesItemStopAfterIf +from .flow_value_modules_item_value_type_0 import FlowValueModulesItemValueType0 +from .flow_value_modules_item_value_type_0_language import FlowValueModulesItemValueType0Language +from .flow_value_modules_item_value_type_1 import FlowValueModulesItemValueType1 +from .flow_value_modules_item_value_type_1_type import FlowValueModulesItemValueType1Type +from .flow_value_modules_item_value_type_2 import FlowValueModulesItemValueType2 +from .flow_value_modules_item_value_type_2_iterator_type_0 import FlowValueModulesItemValueType2IteratorType0 +from .flow_value_modules_item_value_type_2_iterator_type_0_type import FlowValueModulesItemValueType2IteratorType0Type +from .flow_value_modules_item_value_type_2_iterator_type_1 import FlowValueModulesItemValueType2IteratorType1 +from .flow_value_modules_item_value_type_2_iterator_type_1_type import FlowValueModulesItemValueType2IteratorType1Type +from .flow_value_modules_item_value_type_2_type import FlowValueModulesItemValueType2Type +from .flow_value_modules_item_value_type_3 import FlowValueModulesItemValueType3 +from .flow_value_modules_item_value_type_3_type import FlowValueModulesItemValueType3Type +from .forloop_flow import ForloopFlow +from .forloop_flow_iterator_type_0 import ForloopFlowIteratorType0 +from .forloop_flow_iterator_type_0_type import ForloopFlowIteratorType0Type +from .forloop_flow_iterator_type_1 import ForloopFlowIteratorType1 +from .forloop_flow_iterator_type_1_type import ForloopFlowIteratorType1Type +from .forloop_flow_type import ForloopFlowType +from .get_audit_log_response_200 import GetAuditLogResponse200 +from .get_audit_log_response_200_action_kind import GetAuditLogResponse200ActionKind +from .get_audit_log_response_200_operation import GetAuditLogResponse200Operation +from .get_audit_log_response_200_parameters import GetAuditLogResponse200Parameters +from .get_completed_job_response_200 import GetCompletedJobResponse200 +from .get_completed_job_response_200_args import GetCompletedJobResponse200Args +from .get_completed_job_response_200_flow_status import GetCompletedJobResponse200FlowStatus +from .get_completed_job_response_200_flow_status_failure_module import GetCompletedJobResponse200FlowStatusFailureModule +from .get_completed_job_response_200_flow_status_failure_module_iterator import ( + GetCompletedJobResponse200FlowStatusFailureModuleIterator, +) +from .get_completed_job_response_200_flow_status_failure_module_type import ( + GetCompletedJobResponse200FlowStatusFailureModuleType, +) +from .get_completed_job_response_200_flow_status_modules_item import GetCompletedJobResponse200FlowStatusModulesItem +from .get_completed_job_response_200_flow_status_modules_item_iterator import ( + GetCompletedJobResponse200FlowStatusModulesItemIterator, +) +from .get_completed_job_response_200_flow_status_modules_item_type import ( + GetCompletedJobResponse200FlowStatusModulesItemType, +) +from .get_completed_job_response_200_flow_status_retry import GetCompletedJobResponse200FlowStatusRetry +from .get_completed_job_response_200_job_kind import GetCompletedJobResponse200JobKind +from .get_completed_job_response_200_language import GetCompletedJobResponse200Language +from .get_completed_job_response_200_raw_flow import GetCompletedJobResponse200RawFlow +from .get_completed_job_response_200_raw_flow_failure_module import GetCompletedJobResponse200RawFlowFailureModule +from .get_completed_job_response_200_raw_flow_failure_module_input_transforms import ( + GetCompletedJobResponse200RawFlowFailureModuleInputTransforms, +) +from .get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0 import ( + GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0, +) +from .get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0_type import ( + GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from .get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1 import ( + GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1, +) +from .get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1_type import ( + GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1Type, +) +from .get_completed_job_response_200_raw_flow_failure_module_retry import ( + GetCompletedJobResponse200RawFlowFailureModuleRetry, +) +from .get_completed_job_response_200_raw_flow_failure_module_retry_constant import ( + GetCompletedJobResponse200RawFlowFailureModuleRetryConstant, +) +from .get_completed_job_response_200_raw_flow_failure_module_retry_exponential import ( + GetCompletedJobResponse200RawFlowFailureModuleRetryExponential, +) +from .get_completed_job_response_200_raw_flow_failure_module_sleep_type_0 import ( + GetCompletedJobResponse200RawFlowFailureModuleSleepType0, +) +from .get_completed_job_response_200_raw_flow_failure_module_sleep_type_0_type import ( + GetCompletedJobResponse200RawFlowFailureModuleSleepType0Type, +) +from .get_completed_job_response_200_raw_flow_failure_module_sleep_type_1 import ( + GetCompletedJobResponse200RawFlowFailureModuleSleepType1, +) +from .get_completed_job_response_200_raw_flow_failure_module_sleep_type_1_type import ( + GetCompletedJobResponse200RawFlowFailureModuleSleepType1Type, +) +from .get_completed_job_response_200_raw_flow_failure_module_stop_after_if import ( + GetCompletedJobResponse200RawFlowFailureModuleStopAfterIf, +) +from .get_completed_job_response_200_raw_flow_failure_module_value_type_0 import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType0, +) +from .get_completed_job_response_200_raw_flow_failure_module_value_type_0_language import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType0Language, +) +from .get_completed_job_response_200_raw_flow_failure_module_value_type_1 import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType1, +) +from .get_completed_job_response_200_raw_flow_failure_module_value_type_1_type import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType1Type, +) +from .get_completed_job_response_200_raw_flow_failure_module_value_type_2 import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType2, +) +from .get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0 import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0, +) +from .get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0_type import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0Type, +) +from .get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1 import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1, +) +from .get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1_type import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1Type, +) +from .get_completed_job_response_200_raw_flow_failure_module_value_type_2_type import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType2Type, +) +from .get_completed_job_response_200_raw_flow_failure_module_value_type_3 import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType3, +) +from .get_completed_job_response_200_raw_flow_failure_module_value_type_3_type import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType3Type, +) +from .get_completed_job_response_200_raw_flow_modules_item import GetCompletedJobResponse200RawFlowModulesItem +from .get_completed_job_response_200_raw_flow_modules_item_input_transforms import ( + GetCompletedJobResponse200RawFlowModulesItemInputTransforms, +) +from .get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0 import ( + GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0, +) +from .get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0_type import ( + GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0Type, +) +from .get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1 import ( + GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1, +) +from .get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1_type import ( + GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1Type, +) +from .get_completed_job_response_200_raw_flow_modules_item_retry import ( + GetCompletedJobResponse200RawFlowModulesItemRetry, +) +from .get_completed_job_response_200_raw_flow_modules_item_retry_constant import ( + GetCompletedJobResponse200RawFlowModulesItemRetryConstant, +) +from .get_completed_job_response_200_raw_flow_modules_item_retry_exponential import ( + GetCompletedJobResponse200RawFlowModulesItemRetryExponential, +) +from .get_completed_job_response_200_raw_flow_modules_item_sleep_type_0 import ( + GetCompletedJobResponse200RawFlowModulesItemSleepType0, +) +from .get_completed_job_response_200_raw_flow_modules_item_sleep_type_0_type import ( + GetCompletedJobResponse200RawFlowModulesItemSleepType0Type, +) +from .get_completed_job_response_200_raw_flow_modules_item_sleep_type_1 import ( + GetCompletedJobResponse200RawFlowModulesItemSleepType1, +) +from .get_completed_job_response_200_raw_flow_modules_item_sleep_type_1_type import ( + GetCompletedJobResponse200RawFlowModulesItemSleepType1Type, +) +from .get_completed_job_response_200_raw_flow_modules_item_stop_after_if import ( + GetCompletedJobResponse200RawFlowModulesItemStopAfterIf, +) +from .get_completed_job_response_200_raw_flow_modules_item_value_type_0 import ( + GetCompletedJobResponse200RawFlowModulesItemValueType0, +) +from .get_completed_job_response_200_raw_flow_modules_item_value_type_0_language import ( + GetCompletedJobResponse200RawFlowModulesItemValueType0Language, +) +from .get_completed_job_response_200_raw_flow_modules_item_value_type_1 import ( + GetCompletedJobResponse200RawFlowModulesItemValueType1, +) +from .get_completed_job_response_200_raw_flow_modules_item_value_type_1_type import ( + GetCompletedJobResponse200RawFlowModulesItemValueType1Type, +) +from .get_completed_job_response_200_raw_flow_modules_item_value_type_2 import ( + GetCompletedJobResponse200RawFlowModulesItemValueType2, +) +from .get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0 import ( + GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0, +) +from .get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0_type import ( + GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0Type, +) +from .get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1 import ( + GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1, +) +from .get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1_type import ( + GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1Type, +) +from .get_completed_job_response_200_raw_flow_modules_item_value_type_2_type import ( + GetCompletedJobResponse200RawFlowModulesItemValueType2Type, +) +from .get_completed_job_response_200_raw_flow_modules_item_value_type_3 import ( + GetCompletedJobResponse200RawFlowModulesItemValueType3, +) +from .get_completed_job_response_200_raw_flow_modules_item_value_type_3_type import ( + GetCompletedJobResponse200RawFlowModulesItemValueType3Type, +) +from .get_completed_job_response_200_result import GetCompletedJobResponse200Result +from .get_flow_by_path_response_200 import GetFlowByPathResponse200 +from .get_flow_by_path_response_200_extra_perms import GetFlowByPathResponse200ExtraPerms +from .get_flow_by_path_response_200_schema import GetFlowByPathResponse200Schema +from .get_flow_by_path_response_200_value import GetFlowByPathResponse200Value +from .get_flow_by_path_response_200_value_failure_module import GetFlowByPathResponse200ValueFailureModule +from .get_flow_by_path_response_200_value_failure_module_input_transforms import ( + GetFlowByPathResponse200ValueFailureModuleInputTransforms, +) +from .get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_0 import ( + GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType0, +) +from .get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_0_type import ( + GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from .get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_1 import ( + GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType1, +) +from .get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_1_type import ( + GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType1Type, +) +from .get_flow_by_path_response_200_value_failure_module_retry import GetFlowByPathResponse200ValueFailureModuleRetry +from .get_flow_by_path_response_200_value_failure_module_retry_constant import ( + GetFlowByPathResponse200ValueFailureModuleRetryConstant, +) +from .get_flow_by_path_response_200_value_failure_module_retry_exponential import ( + GetFlowByPathResponse200ValueFailureModuleRetryExponential, +) +from .get_flow_by_path_response_200_value_failure_module_sleep_type_0 import ( + GetFlowByPathResponse200ValueFailureModuleSleepType0, +) +from .get_flow_by_path_response_200_value_failure_module_sleep_type_0_type import ( + GetFlowByPathResponse200ValueFailureModuleSleepType0Type, +) +from .get_flow_by_path_response_200_value_failure_module_sleep_type_1 import ( + GetFlowByPathResponse200ValueFailureModuleSleepType1, +) +from .get_flow_by_path_response_200_value_failure_module_sleep_type_1_type import ( + GetFlowByPathResponse200ValueFailureModuleSleepType1Type, +) +from .get_flow_by_path_response_200_value_failure_module_stop_after_if import ( + GetFlowByPathResponse200ValueFailureModuleStopAfterIf, +) +from .get_flow_by_path_response_200_value_failure_module_value_type_0 import ( + GetFlowByPathResponse200ValueFailureModuleValueType0, +) +from .get_flow_by_path_response_200_value_failure_module_value_type_0_language import ( + GetFlowByPathResponse200ValueFailureModuleValueType0Language, +) +from .get_flow_by_path_response_200_value_failure_module_value_type_1 import ( + GetFlowByPathResponse200ValueFailureModuleValueType1, +) +from .get_flow_by_path_response_200_value_failure_module_value_type_1_type import ( + GetFlowByPathResponse200ValueFailureModuleValueType1Type, +) +from .get_flow_by_path_response_200_value_failure_module_value_type_2 import ( + GetFlowByPathResponse200ValueFailureModuleValueType2, +) +from .get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_0 import ( + GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType0, +) +from .get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_0_type import ( + GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType0Type, +) +from .get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_1 import ( + GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType1, +) +from .get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_1_type import ( + GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType1Type, +) +from .get_flow_by_path_response_200_value_failure_module_value_type_2_type import ( + GetFlowByPathResponse200ValueFailureModuleValueType2Type, +) +from .get_flow_by_path_response_200_value_failure_module_value_type_3 import ( + GetFlowByPathResponse200ValueFailureModuleValueType3, +) +from .get_flow_by_path_response_200_value_failure_module_value_type_3_type import ( + GetFlowByPathResponse200ValueFailureModuleValueType3Type, +) +from .get_flow_by_path_response_200_value_modules_item import GetFlowByPathResponse200ValueModulesItem +from .get_flow_by_path_response_200_value_modules_item_input_transforms import ( + GetFlowByPathResponse200ValueModulesItemInputTransforms, +) +from .get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_0 import ( + GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType0, +) +from .get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_0_type import ( + GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType0Type, +) +from .get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_1 import ( + GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType1, +) +from .get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_1_type import ( + GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType1Type, +) +from .get_flow_by_path_response_200_value_modules_item_retry import GetFlowByPathResponse200ValueModulesItemRetry +from .get_flow_by_path_response_200_value_modules_item_retry_constant import ( + GetFlowByPathResponse200ValueModulesItemRetryConstant, +) +from .get_flow_by_path_response_200_value_modules_item_retry_exponential import ( + GetFlowByPathResponse200ValueModulesItemRetryExponential, +) +from .get_flow_by_path_response_200_value_modules_item_sleep_type_0 import ( + GetFlowByPathResponse200ValueModulesItemSleepType0, +) +from .get_flow_by_path_response_200_value_modules_item_sleep_type_0_type import ( + GetFlowByPathResponse200ValueModulesItemSleepType0Type, +) +from .get_flow_by_path_response_200_value_modules_item_sleep_type_1 import ( + GetFlowByPathResponse200ValueModulesItemSleepType1, +) +from .get_flow_by_path_response_200_value_modules_item_sleep_type_1_type import ( + GetFlowByPathResponse200ValueModulesItemSleepType1Type, +) +from .get_flow_by_path_response_200_value_modules_item_stop_after_if import ( + GetFlowByPathResponse200ValueModulesItemStopAfterIf, +) +from .get_flow_by_path_response_200_value_modules_item_value_type_0 import ( + GetFlowByPathResponse200ValueModulesItemValueType0, +) +from .get_flow_by_path_response_200_value_modules_item_value_type_0_language import ( + GetFlowByPathResponse200ValueModulesItemValueType0Language, +) +from .get_flow_by_path_response_200_value_modules_item_value_type_1 import ( + GetFlowByPathResponse200ValueModulesItemValueType1, +) +from .get_flow_by_path_response_200_value_modules_item_value_type_1_type import ( + GetFlowByPathResponse200ValueModulesItemValueType1Type, +) +from .get_flow_by_path_response_200_value_modules_item_value_type_2 import ( + GetFlowByPathResponse200ValueModulesItemValueType2, +) +from .get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_0 import ( + GetFlowByPathResponse200ValueModulesItemValueType2IteratorType0, +) +from .get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_0_type import ( + GetFlowByPathResponse200ValueModulesItemValueType2IteratorType0Type, +) +from .get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_1 import ( + GetFlowByPathResponse200ValueModulesItemValueType2IteratorType1, +) +from .get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_1_type import ( + GetFlowByPathResponse200ValueModulesItemValueType2IteratorType1Type, +) +from .get_flow_by_path_response_200_value_modules_item_value_type_2_type import ( + GetFlowByPathResponse200ValueModulesItemValueType2Type, +) +from .get_flow_by_path_response_200_value_modules_item_value_type_3 import ( + GetFlowByPathResponse200ValueModulesItemValueType3, +) +from .get_flow_by_path_response_200_value_modules_item_value_type_3_type import ( + GetFlowByPathResponse200ValueModulesItemValueType3Type, +) +from .get_granular_acls_kind import GetGranularAclsKind +from .get_granular_acls_response_200 import GetGranularAclsResponse200 +from .get_group_response_200 import GetGroupResponse200 +from .get_group_response_200_extra_perms import GetGroupResponse200ExtraPerms +from .get_hub_flow_by_id_response_200 import GetHubFlowByIdResponse200 +from .get_hub_flow_by_id_response_200_flow import GetHubFlowByIdResponse200Flow +from .get_hub_flow_by_id_response_200_flow_schema import GetHubFlowByIdResponse200FlowSchema +from .get_hub_flow_by_id_response_200_flow_value import GetHubFlowByIdResponse200FlowValue +from .get_hub_flow_by_id_response_200_flow_value_failure_module import GetHubFlowByIdResponse200FlowValueFailureModule +from .get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms import ( + GetHubFlowByIdResponse200FlowValueFailureModuleInputTransforms, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_0 import ( + GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType0, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_0_type import ( + GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_1 import ( + GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType1, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_1_type import ( + GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType1Type, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_retry import ( + GetHubFlowByIdResponse200FlowValueFailureModuleRetry, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_retry_constant import ( + GetHubFlowByIdResponse200FlowValueFailureModuleRetryConstant, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_retry_exponential import ( + GetHubFlowByIdResponse200FlowValueFailureModuleRetryExponential, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_0 import ( + GetHubFlowByIdResponse200FlowValueFailureModuleSleepType0, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_0_type import ( + GetHubFlowByIdResponse200FlowValueFailureModuleSleepType0Type, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_1 import ( + GetHubFlowByIdResponse200FlowValueFailureModuleSleepType1, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_1_type import ( + GetHubFlowByIdResponse200FlowValueFailureModuleSleepType1Type, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_stop_after_if import ( + GetHubFlowByIdResponse200FlowValueFailureModuleStopAfterIf, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_0 import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType0, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_0_language import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType0Language, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_1 import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType1, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_1_type import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType1Type, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2 import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType2, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_0 import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType0, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_0_type import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType0Type, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_1 import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType1, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_1_type import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType1Type, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_type import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType2Type, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_3 import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType3, +) +from .get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_3_type import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType3Type, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item import GetHubFlowByIdResponse200FlowValueModulesItem +from .get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms import ( + GetHubFlowByIdResponse200FlowValueModulesItemInputTransforms, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_0 import ( + GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType0, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_0_type import ( + GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType0Type, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_1 import ( + GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType1, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_1_type import ( + GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType1Type, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_retry import ( + GetHubFlowByIdResponse200FlowValueModulesItemRetry, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_retry_constant import ( + GetHubFlowByIdResponse200FlowValueModulesItemRetryConstant, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_retry_exponential import ( + GetHubFlowByIdResponse200FlowValueModulesItemRetryExponential, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_0 import ( + GetHubFlowByIdResponse200FlowValueModulesItemSleepType0, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_0_type import ( + GetHubFlowByIdResponse200FlowValueModulesItemSleepType0Type, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_1 import ( + GetHubFlowByIdResponse200FlowValueModulesItemSleepType1, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_1_type import ( + GetHubFlowByIdResponse200FlowValueModulesItemSleepType1Type, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_stop_after_if import ( + GetHubFlowByIdResponse200FlowValueModulesItemStopAfterIf, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_0 import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType0, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_0_language import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType0Language, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_1 import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType1, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_1_type import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType1Type, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2 import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType2, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_0 import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType0, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_0_type import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType0Type, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_1 import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType1, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_1_type import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType1Type, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_type import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType2Type, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_3 import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType3, +) +from .get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_3_type import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType3Type, +) +from .get_job_response_200 import GetJobResponse200 +from .get_job_response_200_type import GetJobResponse200Type +from .get_job_updates_response_200 import GetJobUpdatesResponse200 +from .get_resource_response_200 import GetResourceResponse200 +from .get_resource_response_200_extra_perms import GetResourceResponse200ExtraPerms +from .get_resource_response_200_value import GetResourceResponse200Value +from .get_resource_type_response_200 import GetResourceTypeResponse200 +from .get_schedule_response_200 import GetScheduleResponse200 +from .get_schedule_response_200_args import GetScheduleResponse200Args +from .get_schedule_response_200_extra_perms import GetScheduleResponse200ExtraPerms +from .get_script_by_hash_response_200 import GetScriptByHashResponse200 +from .get_script_by_hash_response_200_extra_perms import GetScriptByHashResponse200ExtraPerms +from .get_script_by_hash_response_200_kind import GetScriptByHashResponse200Kind +from .get_script_by_hash_response_200_language import GetScriptByHashResponse200Language +from .get_script_by_hash_response_200_schema import GetScriptByHashResponse200Schema +from .get_script_by_path_response_200 import GetScriptByPathResponse200 +from .get_script_by_path_response_200_extra_perms import GetScriptByPathResponse200ExtraPerms +from .get_script_by_path_response_200_kind import GetScriptByPathResponse200Kind +from .get_script_by_path_response_200_language import GetScriptByPathResponse200Language +from .get_script_by_path_response_200_schema import GetScriptByPathResponse200Schema +from .get_script_deployment_status_response_200 import GetScriptDeploymentStatusResponse200 +from .get_settings_response_200 import GetSettingsResponse200 +from .get_variable_response_200 import GetVariableResponse200 +from .get_variable_response_200_extra_perms import GetVariableResponse200ExtraPerms +from .global_user_info import GlobalUserInfo +from .global_user_info_login_type import GlobalUserInfoLoginType +from .global_user_update_json_body import GlobalUserUpdateJsonBody +from .global_whoami_response_200 import GlobalWhoamiResponse200 +from .global_whoami_response_200_login_type import GlobalWhoamiResponse200LoginType +from .go_to_jsonschema_response_200 import GoToJsonschemaResponse200 +from .go_to_jsonschema_response_200_args_item import GoToJsonschemaResponse200ArgsItem +from .go_to_jsonschema_response_200_args_item_typ_type_0 import GoToJsonschemaResponse200ArgsItemTypType0 +from .go_to_jsonschema_response_200_args_item_typ_type_1 import GoToJsonschemaResponse200ArgsItemTypType1 +from .go_to_jsonschema_response_200_args_item_typ_type_2 import GoToJsonschemaResponse200ArgsItemTypType2 +from .go_to_jsonschema_response_200_args_item_typ_type_3 import GoToJsonschemaResponse200ArgsItemTypType3 +from .go_to_jsonschema_response_200_args_item_typ_type_3_object_item import ( + GoToJsonschemaResponse200ArgsItemTypType3ObjectItem, +) +from .go_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_0 import ( + GoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0, +) +from .go_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1 import ( + GoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1, +) +from .go_to_jsonschema_response_200_args_item_typ_type_4 import GoToJsonschemaResponse200ArgsItemTypType4 +from .go_to_jsonschema_response_200_args_item_typ_type_4_list_type_0 import ( + GoToJsonschemaResponse200ArgsItemTypType4ListType0, +) +from .go_to_jsonschema_response_200_args_item_typ_type_4_list_type_1 import ( + GoToJsonschemaResponse200ArgsItemTypType4ListType1, +) +from .group import Group +from .group_extra_perms import GroupExtraPerms +from .input_transform_type_0 import InputTransformType0 +from .input_transform_type_0_type import InputTransformType0Type +from .input_transform_type_1 import InputTransformType1 +from .input_transform_type_1_type import InputTransformType1Type +from .invite_user_json_body import InviteUserJsonBody +from .javascript_transform import JavascriptTransform +from .javascript_transform_type import JavascriptTransformType +from .job import Job +from .job_type import JobType +from .list_audit_logs_action_kind import ListAuditLogsActionKind +from .list_audit_logs_response_200_item import ListAuditLogsResponse200Item +from .list_audit_logs_response_200_item_action_kind import ListAuditLogsResponse200ItemActionKind +from .list_audit_logs_response_200_item_operation import ListAuditLogsResponse200ItemOperation +from .list_audit_logs_response_200_item_parameters import ListAuditLogsResponse200ItemParameters +from .list_completed_jobs_response_200_item import ListCompletedJobsResponse200Item +from .list_completed_jobs_response_200_item_args import ListCompletedJobsResponse200ItemArgs +from .list_completed_jobs_response_200_item_flow_status import ListCompletedJobsResponse200ItemFlowStatus +from .list_completed_jobs_response_200_item_flow_status_failure_module import ( + ListCompletedJobsResponse200ItemFlowStatusFailureModule, +) +from .list_completed_jobs_response_200_item_flow_status_failure_module_iterator import ( + ListCompletedJobsResponse200ItemFlowStatusFailureModuleIterator, +) +from .list_completed_jobs_response_200_item_flow_status_failure_module_type import ( + ListCompletedJobsResponse200ItemFlowStatusFailureModuleType, +) +from .list_completed_jobs_response_200_item_flow_status_modules_item import ( + ListCompletedJobsResponse200ItemFlowStatusModulesItem, +) +from .list_completed_jobs_response_200_item_flow_status_modules_item_iterator import ( + ListCompletedJobsResponse200ItemFlowStatusModulesItemIterator, +) +from .list_completed_jobs_response_200_item_flow_status_modules_item_type import ( + ListCompletedJobsResponse200ItemFlowStatusModulesItemType, +) +from .list_completed_jobs_response_200_item_flow_status_retry import ListCompletedJobsResponse200ItemFlowStatusRetry +from .list_completed_jobs_response_200_item_job_kind import ListCompletedJobsResponse200ItemJobKind +from .list_completed_jobs_response_200_item_language import ListCompletedJobsResponse200ItemLanguage +from .list_completed_jobs_response_200_item_raw_flow import ListCompletedJobsResponse200ItemRawFlow +from .list_completed_jobs_response_200_item_raw_flow_failure_module import ( + ListCompletedJobsResponse200ItemRawFlowFailureModule, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransforms, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0 import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0_type import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1 import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1_type import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_retry import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleRetry, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_retry_constant import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleRetryConstant, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_retry_exponential import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleRetryExponential, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_0 import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType0, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_0_type import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType0Type, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_1 import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType1, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_1_type import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType1Type, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_stop_after_if import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleStopAfterIf, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_0 import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType0, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_0_language import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType0Language, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_1 import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType1, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_1_type import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType1Type, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2 import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0 import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType0, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0_type import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType0Type, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1 import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType1, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1_type import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType1Type, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_type import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2Type, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_3 import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType3, +) +from .list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_3_type import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType3Type, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item import ( + ListCompletedJobsResponse200ItemRawFlowModulesItem, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransforms, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0 import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0_type import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0Type, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1 import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1_type import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1Type, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_retry import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemRetry, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_retry_constant import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemRetryConstant, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_retry_exponential import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemRetryExponential, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_0 import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType0, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_0_type import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType0Type, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_1 import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType1, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_1_type import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType1Type, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_stop_after_if import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemStopAfterIf, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_0 import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType0, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_0_language import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType0Language, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_1 import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType1, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_1_type import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType1Type, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2 import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0 import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType0, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0_type import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType0Type, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1 import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType1, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1_type import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType1Type, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_type import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2Type, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_3 import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType3, +) +from .list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_3_type import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType3Type, +) +from .list_completed_jobs_response_200_item_result import ListCompletedJobsResponse200ItemResult +from .list_contextual_variables_response_200_item import ListContextualVariablesResponse200Item +from .list_flows_response_200_item import ListFlowsResponse200Item +from .list_flows_response_200_item_extra_perms import ListFlowsResponse200ItemExtraPerms +from .list_flows_response_200_item_schema import ListFlowsResponse200ItemSchema +from .list_flows_response_200_item_value import ListFlowsResponse200ItemValue +from .list_flows_response_200_item_value_failure_module import ListFlowsResponse200ItemValueFailureModule +from .list_flows_response_200_item_value_failure_module_input_transforms import ( + ListFlowsResponse200ItemValueFailureModuleInputTransforms, +) +from .list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_0 import ( + ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType0, +) +from .list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_0_type import ( + ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from .list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_1 import ( + ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType1, +) +from .list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_1_type import ( + ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType1Type, +) +from .list_flows_response_200_item_value_failure_module_retry import ListFlowsResponse200ItemValueFailureModuleRetry +from .list_flows_response_200_item_value_failure_module_retry_constant import ( + ListFlowsResponse200ItemValueFailureModuleRetryConstant, +) +from .list_flows_response_200_item_value_failure_module_retry_exponential import ( + ListFlowsResponse200ItemValueFailureModuleRetryExponential, +) +from .list_flows_response_200_item_value_failure_module_sleep_type_0 import ( + ListFlowsResponse200ItemValueFailureModuleSleepType0, +) +from .list_flows_response_200_item_value_failure_module_sleep_type_0_type import ( + ListFlowsResponse200ItemValueFailureModuleSleepType0Type, +) +from .list_flows_response_200_item_value_failure_module_sleep_type_1 import ( + ListFlowsResponse200ItemValueFailureModuleSleepType1, +) +from .list_flows_response_200_item_value_failure_module_sleep_type_1_type import ( + ListFlowsResponse200ItemValueFailureModuleSleepType1Type, +) +from .list_flows_response_200_item_value_failure_module_stop_after_if import ( + ListFlowsResponse200ItemValueFailureModuleStopAfterIf, +) +from .list_flows_response_200_item_value_failure_module_value_type_0 import ( + ListFlowsResponse200ItemValueFailureModuleValueType0, +) +from .list_flows_response_200_item_value_failure_module_value_type_0_language import ( + ListFlowsResponse200ItemValueFailureModuleValueType0Language, +) +from .list_flows_response_200_item_value_failure_module_value_type_1 import ( + ListFlowsResponse200ItemValueFailureModuleValueType1, +) +from .list_flows_response_200_item_value_failure_module_value_type_1_type import ( + ListFlowsResponse200ItemValueFailureModuleValueType1Type, +) +from .list_flows_response_200_item_value_failure_module_value_type_2 import ( + ListFlowsResponse200ItemValueFailureModuleValueType2, +) +from .list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_0 import ( + ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType0, +) +from .list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_0_type import ( + ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType0Type, +) +from .list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_1 import ( + ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType1, +) +from .list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_1_type import ( + ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType1Type, +) +from .list_flows_response_200_item_value_failure_module_value_type_2_type import ( + ListFlowsResponse200ItemValueFailureModuleValueType2Type, +) +from .list_flows_response_200_item_value_failure_module_value_type_3 import ( + ListFlowsResponse200ItemValueFailureModuleValueType3, +) +from .list_flows_response_200_item_value_failure_module_value_type_3_type import ( + ListFlowsResponse200ItemValueFailureModuleValueType3Type, +) +from .list_flows_response_200_item_value_modules_item import ListFlowsResponse200ItemValueModulesItem +from .list_flows_response_200_item_value_modules_item_input_transforms import ( + ListFlowsResponse200ItemValueModulesItemInputTransforms, +) +from .list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_0 import ( + ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType0, +) +from .list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_0_type import ( + ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType0Type, +) +from .list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_1 import ( + ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType1, +) +from .list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_1_type import ( + ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType1Type, +) +from .list_flows_response_200_item_value_modules_item_retry import ListFlowsResponse200ItemValueModulesItemRetry +from .list_flows_response_200_item_value_modules_item_retry_constant import ( + ListFlowsResponse200ItemValueModulesItemRetryConstant, +) +from .list_flows_response_200_item_value_modules_item_retry_exponential import ( + ListFlowsResponse200ItemValueModulesItemRetryExponential, +) +from .list_flows_response_200_item_value_modules_item_sleep_type_0 import ( + ListFlowsResponse200ItemValueModulesItemSleepType0, +) +from .list_flows_response_200_item_value_modules_item_sleep_type_0_type import ( + ListFlowsResponse200ItemValueModulesItemSleepType0Type, +) +from .list_flows_response_200_item_value_modules_item_sleep_type_1 import ( + ListFlowsResponse200ItemValueModulesItemSleepType1, +) +from .list_flows_response_200_item_value_modules_item_sleep_type_1_type import ( + ListFlowsResponse200ItemValueModulesItemSleepType1Type, +) +from .list_flows_response_200_item_value_modules_item_stop_after_if import ( + ListFlowsResponse200ItemValueModulesItemStopAfterIf, +) +from .list_flows_response_200_item_value_modules_item_value_type_0 import ( + ListFlowsResponse200ItemValueModulesItemValueType0, +) +from .list_flows_response_200_item_value_modules_item_value_type_0_language import ( + ListFlowsResponse200ItemValueModulesItemValueType0Language, +) +from .list_flows_response_200_item_value_modules_item_value_type_1 import ( + ListFlowsResponse200ItemValueModulesItemValueType1, +) +from .list_flows_response_200_item_value_modules_item_value_type_1_type import ( + ListFlowsResponse200ItemValueModulesItemValueType1Type, +) +from .list_flows_response_200_item_value_modules_item_value_type_2 import ( + ListFlowsResponse200ItemValueModulesItemValueType2, +) +from .list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_0 import ( + ListFlowsResponse200ItemValueModulesItemValueType2IteratorType0, +) +from .list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_0_type import ( + ListFlowsResponse200ItemValueModulesItemValueType2IteratorType0Type, +) +from .list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_1 import ( + ListFlowsResponse200ItemValueModulesItemValueType2IteratorType1, +) +from .list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_1_type import ( + ListFlowsResponse200ItemValueModulesItemValueType2IteratorType1Type, +) +from .list_flows_response_200_item_value_modules_item_value_type_2_type import ( + ListFlowsResponse200ItemValueModulesItemValueType2Type, +) +from .list_flows_response_200_item_value_modules_item_value_type_3 import ( + ListFlowsResponse200ItemValueModulesItemValueType3, +) +from .list_flows_response_200_item_value_modules_item_value_type_3_type import ( + ListFlowsResponse200ItemValueModulesItemValueType3Type, +) +from .list_groups_response_200_item import ListGroupsResponse200Item +from .list_groups_response_200_item_extra_perms import ListGroupsResponse200ItemExtraPerms +from .list_hub_flows_response_200 import ListHubFlowsResponse200 +from .list_hub_flows_response_200_flows_item import ListHubFlowsResponse200FlowsItem +from .list_hub_scripts_response_200 import ListHubScriptsResponse200 +from .list_hub_scripts_response_200_asks_item import ListHubScriptsResponse200AsksItem +from .list_hub_scripts_response_200_asks_item_kind import ListHubScriptsResponse200AsksItemKind +from .list_jobs_response_200_item import ListJobsResponse200Item +from .list_jobs_response_200_item_type import ListJobsResponse200ItemType +from .list_pending_invites_response_200_item import ListPendingInvitesResponse200Item +from .list_queue_response_200_item import ListQueueResponse200Item +from .list_queue_response_200_item_args import ListQueueResponse200ItemArgs +from .list_queue_response_200_item_flow_status import ListQueueResponse200ItemFlowStatus +from .list_queue_response_200_item_flow_status_failure_module import ListQueueResponse200ItemFlowStatusFailureModule +from .list_queue_response_200_item_flow_status_failure_module_iterator import ( + ListQueueResponse200ItemFlowStatusFailureModuleIterator, +) +from .list_queue_response_200_item_flow_status_failure_module_type import ( + ListQueueResponse200ItemFlowStatusFailureModuleType, +) +from .list_queue_response_200_item_flow_status_modules_item import ListQueueResponse200ItemFlowStatusModulesItem +from .list_queue_response_200_item_flow_status_modules_item_iterator import ( + ListQueueResponse200ItemFlowStatusModulesItemIterator, +) +from .list_queue_response_200_item_flow_status_modules_item_type import ( + ListQueueResponse200ItemFlowStatusModulesItemType, +) +from .list_queue_response_200_item_flow_status_retry import ListQueueResponse200ItemFlowStatusRetry +from .list_queue_response_200_item_job_kind import ListQueueResponse200ItemJobKind +from .list_queue_response_200_item_language import ListQueueResponse200ItemLanguage +from .list_queue_response_200_item_raw_flow import ListQueueResponse200ItemRawFlow +from .list_queue_response_200_item_raw_flow_failure_module import ListQueueResponse200ItemRawFlowFailureModule +from .list_queue_response_200_item_raw_flow_failure_module_input_transforms import ( + ListQueueResponse200ItemRawFlowFailureModuleInputTransforms, +) +from .list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0 import ( + ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0, +) +from .list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0_type import ( + ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from .list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1 import ( + ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1, +) +from .list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1_type import ( + ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type, +) +from .list_queue_response_200_item_raw_flow_failure_module_retry import ( + ListQueueResponse200ItemRawFlowFailureModuleRetry, +) +from .list_queue_response_200_item_raw_flow_failure_module_retry_constant import ( + ListQueueResponse200ItemRawFlowFailureModuleRetryConstant, +) +from .list_queue_response_200_item_raw_flow_failure_module_retry_exponential import ( + ListQueueResponse200ItemRawFlowFailureModuleRetryExponential, +) +from .list_queue_response_200_item_raw_flow_failure_module_sleep_type_0 import ( + ListQueueResponse200ItemRawFlowFailureModuleSleepType0, +) +from .list_queue_response_200_item_raw_flow_failure_module_sleep_type_0_type import ( + ListQueueResponse200ItemRawFlowFailureModuleSleepType0Type, +) +from .list_queue_response_200_item_raw_flow_failure_module_sleep_type_1 import ( + ListQueueResponse200ItemRawFlowFailureModuleSleepType1, +) +from .list_queue_response_200_item_raw_flow_failure_module_sleep_type_1_type import ( + ListQueueResponse200ItemRawFlowFailureModuleSleepType1Type, +) +from .list_queue_response_200_item_raw_flow_failure_module_stop_after_if import ( + ListQueueResponse200ItemRawFlowFailureModuleStopAfterIf, +) +from .list_queue_response_200_item_raw_flow_failure_module_value_type_0 import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType0, +) +from .list_queue_response_200_item_raw_flow_failure_module_value_type_0_language import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType0Language, +) +from .list_queue_response_200_item_raw_flow_failure_module_value_type_1 import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType1, +) +from .list_queue_response_200_item_raw_flow_failure_module_value_type_1_type import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType1Type, +) +from .list_queue_response_200_item_raw_flow_failure_module_value_type_2 import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType2, +) +from .list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0 import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType0, +) +from .list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0_type import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType0Type, +) +from .list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1 import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType1, +) +from .list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1_type import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType1Type, +) +from .list_queue_response_200_item_raw_flow_failure_module_value_type_2_type import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType2Type, +) +from .list_queue_response_200_item_raw_flow_failure_module_value_type_3 import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType3, +) +from .list_queue_response_200_item_raw_flow_failure_module_value_type_3_type import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType3Type, +) +from .list_queue_response_200_item_raw_flow_modules_item import ListQueueResponse200ItemRawFlowModulesItem +from .list_queue_response_200_item_raw_flow_modules_item_input_transforms import ( + ListQueueResponse200ItemRawFlowModulesItemInputTransforms, +) +from .list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0 import ( + ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0, +) +from .list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0_type import ( + ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0Type, +) +from .list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1 import ( + ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1, +) +from .list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1_type import ( + ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1Type, +) +from .list_queue_response_200_item_raw_flow_modules_item_retry import ListQueueResponse200ItemRawFlowModulesItemRetry +from .list_queue_response_200_item_raw_flow_modules_item_retry_constant import ( + ListQueueResponse200ItemRawFlowModulesItemRetryConstant, +) +from .list_queue_response_200_item_raw_flow_modules_item_retry_exponential import ( + ListQueueResponse200ItemRawFlowModulesItemRetryExponential, +) +from .list_queue_response_200_item_raw_flow_modules_item_sleep_type_0 import ( + ListQueueResponse200ItemRawFlowModulesItemSleepType0, +) +from .list_queue_response_200_item_raw_flow_modules_item_sleep_type_0_type import ( + ListQueueResponse200ItemRawFlowModulesItemSleepType0Type, +) +from .list_queue_response_200_item_raw_flow_modules_item_sleep_type_1 import ( + ListQueueResponse200ItemRawFlowModulesItemSleepType1, +) +from .list_queue_response_200_item_raw_flow_modules_item_sleep_type_1_type import ( + ListQueueResponse200ItemRawFlowModulesItemSleepType1Type, +) +from .list_queue_response_200_item_raw_flow_modules_item_stop_after_if import ( + ListQueueResponse200ItemRawFlowModulesItemStopAfterIf, +) +from .list_queue_response_200_item_raw_flow_modules_item_value_type_0 import ( + ListQueueResponse200ItemRawFlowModulesItemValueType0, +) +from .list_queue_response_200_item_raw_flow_modules_item_value_type_0_language import ( + ListQueueResponse200ItemRawFlowModulesItemValueType0Language, +) +from .list_queue_response_200_item_raw_flow_modules_item_value_type_1 import ( + ListQueueResponse200ItemRawFlowModulesItemValueType1, +) +from .list_queue_response_200_item_raw_flow_modules_item_value_type_1_type import ( + ListQueueResponse200ItemRawFlowModulesItemValueType1Type, +) +from .list_queue_response_200_item_raw_flow_modules_item_value_type_2 import ( + ListQueueResponse200ItemRawFlowModulesItemValueType2, +) +from .list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0 import ( + ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType0, +) +from .list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0_type import ( + ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType0Type, +) +from .list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1 import ( + ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType1, +) +from .list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1_type import ( + ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType1Type, +) +from .list_queue_response_200_item_raw_flow_modules_item_value_type_2_type import ( + ListQueueResponse200ItemRawFlowModulesItemValueType2Type, +) +from .list_queue_response_200_item_raw_flow_modules_item_value_type_3 import ( + ListQueueResponse200ItemRawFlowModulesItemValueType3, +) +from .list_queue_response_200_item_raw_flow_modules_item_value_type_3_type import ( + ListQueueResponse200ItemRawFlowModulesItemValueType3Type, +) +from .list_resource_response_200_item import ListResourceResponse200Item +from .list_resource_response_200_item_extra_perms import ListResourceResponse200ItemExtraPerms +from .list_resource_response_200_item_value import ListResourceResponse200ItemValue +from .list_resource_type_response_200_item import ListResourceTypeResponse200Item +from .list_schedules_response_200_item import ListSchedulesResponse200Item +from .list_schedules_response_200_item_args import ListSchedulesResponse200ItemArgs +from .list_schedules_response_200_item_extra_perms import ListSchedulesResponse200ItemExtraPerms +from .list_scripts_response_200_item import ListScriptsResponse200Item +from .list_scripts_response_200_item_extra_perms import ListScriptsResponse200ItemExtraPerms +from .list_scripts_response_200_item_kind import ListScriptsResponse200ItemKind +from .list_scripts_response_200_item_language import ListScriptsResponse200ItemLanguage +from .list_scripts_response_200_item_schema import ListScriptsResponse200ItemSchema +from .list_tokens_response_200_item import ListTokensResponse200Item +from .list_user_workspaces_response_200 import ListUserWorkspacesResponse200 +from .list_user_workspaces_response_200_workspaces_item import ListUserWorkspacesResponse200WorkspacesItem +from .list_users_as_super_admin_response_200_item import ListUsersAsSuperAdminResponse200Item +from .list_users_as_super_admin_response_200_item_login_type import ListUsersAsSuperAdminResponse200ItemLoginType +from .list_users_response_200_item import ListUsersResponse200Item +from .list_users_response_200_item_usage import ListUsersResponse200ItemUsage +from .list_variable_response_200_item import ListVariableResponse200Item +from .list_variable_response_200_item_extra_perms import ListVariableResponse200ItemExtraPerms +from .list_workers_response_200_item import ListWorkersResponse200Item +from .list_workspace_invites_response_200_item import ListWorkspaceInvitesResponse200Item +from .list_workspaces_as_super_admin_response_200_item import ListWorkspacesAsSuperAdminResponse200Item +from .list_workspaces_response_200_item import ListWorkspacesResponse200Item +from .listable_variable import ListableVariable +from .listable_variable_extra_perms import ListableVariableExtraPerms +from .login import Login +from .login_json_body import LoginJsonBody +from .login_with_oauth_json_body import LoginWithOauthJsonBody +from .main_arg_signature import MainArgSignature +from .main_arg_signature_args_item import MainArgSignatureArgsItem +from .main_arg_signature_args_item_typ_type_0 import MainArgSignatureArgsItemTypType0 +from .main_arg_signature_args_item_typ_type_1 import MainArgSignatureArgsItemTypType1 +from .main_arg_signature_args_item_typ_type_2 import MainArgSignatureArgsItemTypType2 +from .main_arg_signature_args_item_typ_type_3 import MainArgSignatureArgsItemTypType3 +from .main_arg_signature_args_item_typ_type_3_object_item import MainArgSignatureArgsItemTypType3ObjectItem +from .main_arg_signature_args_item_typ_type_3_object_item_typ_type_0 import ( + MainArgSignatureArgsItemTypType3ObjectItemTypType0, +) +from .main_arg_signature_args_item_typ_type_3_object_item_typ_type_1 import ( + MainArgSignatureArgsItemTypType3ObjectItemTypType1, +) +from .main_arg_signature_args_item_typ_type_4 import MainArgSignatureArgsItemTypType4 +from .main_arg_signature_args_item_typ_type_4_list_type_0 import MainArgSignatureArgsItemTypType4ListType0 +from .main_arg_signature_args_item_typ_type_4_list_type_1 import MainArgSignatureArgsItemTypType4ListType1 +from .new_schedule import NewSchedule +from .new_schedule_args import NewScheduleArgs +from .new_token import NewToken +from .new_user import NewUser +from .open_flow import OpenFlow +from .open_flow_schema import OpenFlowSchema +from .open_flow_value import OpenFlowValue +from .open_flow_value_failure_module import OpenFlowValueFailureModule +from .open_flow_value_failure_module_input_transforms import OpenFlowValueFailureModuleInputTransforms +from .open_flow_value_failure_module_input_transforms_additional_property_type_0 import ( + OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType0, +) +from .open_flow_value_failure_module_input_transforms_additional_property_type_0_type import ( + OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from .open_flow_value_failure_module_input_transforms_additional_property_type_1 import ( + OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType1, +) +from .open_flow_value_failure_module_input_transforms_additional_property_type_1_type import ( + OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType1Type, +) +from .open_flow_value_failure_module_retry import OpenFlowValueFailureModuleRetry +from .open_flow_value_failure_module_retry_constant import OpenFlowValueFailureModuleRetryConstant +from .open_flow_value_failure_module_retry_exponential import OpenFlowValueFailureModuleRetryExponential +from .open_flow_value_failure_module_sleep_type_0 import OpenFlowValueFailureModuleSleepType0 +from .open_flow_value_failure_module_sleep_type_0_type import OpenFlowValueFailureModuleSleepType0Type +from .open_flow_value_failure_module_sleep_type_1 import OpenFlowValueFailureModuleSleepType1 +from .open_flow_value_failure_module_sleep_type_1_type import OpenFlowValueFailureModuleSleepType1Type +from .open_flow_value_failure_module_stop_after_if import OpenFlowValueFailureModuleStopAfterIf +from .open_flow_value_failure_module_value_type_0 import OpenFlowValueFailureModuleValueType0 +from .open_flow_value_failure_module_value_type_0_language import OpenFlowValueFailureModuleValueType0Language +from .open_flow_value_failure_module_value_type_1 import OpenFlowValueFailureModuleValueType1 +from .open_flow_value_failure_module_value_type_1_type import OpenFlowValueFailureModuleValueType1Type +from .open_flow_value_failure_module_value_type_2 import OpenFlowValueFailureModuleValueType2 +from .open_flow_value_failure_module_value_type_2_iterator_type_0 import ( + OpenFlowValueFailureModuleValueType2IteratorType0, +) +from .open_flow_value_failure_module_value_type_2_iterator_type_0_type import ( + OpenFlowValueFailureModuleValueType2IteratorType0Type, +) +from .open_flow_value_failure_module_value_type_2_iterator_type_1 import ( + OpenFlowValueFailureModuleValueType2IteratorType1, +) +from .open_flow_value_failure_module_value_type_2_iterator_type_1_type import ( + OpenFlowValueFailureModuleValueType2IteratorType1Type, +) +from .open_flow_value_failure_module_value_type_2_type import OpenFlowValueFailureModuleValueType2Type +from .open_flow_value_failure_module_value_type_3 import OpenFlowValueFailureModuleValueType3 +from .open_flow_value_failure_module_value_type_3_type import OpenFlowValueFailureModuleValueType3Type +from .open_flow_value_modules_item import OpenFlowValueModulesItem +from .open_flow_value_modules_item_input_transforms import OpenFlowValueModulesItemInputTransforms +from .open_flow_value_modules_item_input_transforms_additional_property_type_0 import ( + OpenFlowValueModulesItemInputTransformsAdditionalPropertyType0, +) +from .open_flow_value_modules_item_input_transforms_additional_property_type_0_type import ( + OpenFlowValueModulesItemInputTransformsAdditionalPropertyType0Type, +) +from .open_flow_value_modules_item_input_transforms_additional_property_type_1 import ( + OpenFlowValueModulesItemInputTransformsAdditionalPropertyType1, +) +from .open_flow_value_modules_item_input_transforms_additional_property_type_1_type import ( + OpenFlowValueModulesItemInputTransformsAdditionalPropertyType1Type, +) +from .open_flow_value_modules_item_retry import OpenFlowValueModulesItemRetry +from .open_flow_value_modules_item_retry_constant import OpenFlowValueModulesItemRetryConstant +from .open_flow_value_modules_item_retry_exponential import OpenFlowValueModulesItemRetryExponential +from .open_flow_value_modules_item_sleep_type_0 import OpenFlowValueModulesItemSleepType0 +from .open_flow_value_modules_item_sleep_type_0_type import OpenFlowValueModulesItemSleepType0Type +from .open_flow_value_modules_item_sleep_type_1 import OpenFlowValueModulesItemSleepType1 +from .open_flow_value_modules_item_sleep_type_1_type import OpenFlowValueModulesItemSleepType1Type +from .open_flow_value_modules_item_stop_after_if import OpenFlowValueModulesItemStopAfterIf +from .open_flow_value_modules_item_value_type_0 import OpenFlowValueModulesItemValueType0 +from .open_flow_value_modules_item_value_type_0_language import OpenFlowValueModulesItemValueType0Language +from .open_flow_value_modules_item_value_type_1 import OpenFlowValueModulesItemValueType1 +from .open_flow_value_modules_item_value_type_1_type import OpenFlowValueModulesItemValueType1Type +from .open_flow_value_modules_item_value_type_2 import OpenFlowValueModulesItemValueType2 +from .open_flow_value_modules_item_value_type_2_iterator_type_0 import OpenFlowValueModulesItemValueType2IteratorType0 +from .open_flow_value_modules_item_value_type_2_iterator_type_0_type import ( + OpenFlowValueModulesItemValueType2IteratorType0Type, +) +from .open_flow_value_modules_item_value_type_2_iterator_type_1 import OpenFlowValueModulesItemValueType2IteratorType1 +from .open_flow_value_modules_item_value_type_2_iterator_type_1_type import ( + OpenFlowValueModulesItemValueType2IteratorType1Type, +) +from .open_flow_value_modules_item_value_type_2_type import OpenFlowValueModulesItemValueType2Type +from .open_flow_value_modules_item_value_type_3 import OpenFlowValueModulesItemValueType3 +from .open_flow_value_modules_item_value_type_3_type import OpenFlowValueModulesItemValueType3Type +from .open_flow_w_path import OpenFlowWPath +from .open_flow_w_path_schema import OpenFlowWPathSchema +from .open_flow_w_path_value import OpenFlowWPathValue +from .open_flow_w_path_value_failure_module import OpenFlowWPathValueFailureModule +from .open_flow_w_path_value_failure_module_input_transforms import OpenFlowWPathValueFailureModuleInputTransforms +from .open_flow_w_path_value_failure_module_input_transforms_additional_property_type_0 import ( + OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType0, +) +from .open_flow_w_path_value_failure_module_input_transforms_additional_property_type_0_type import ( + OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from .open_flow_w_path_value_failure_module_input_transforms_additional_property_type_1 import ( + OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType1, +) +from .open_flow_w_path_value_failure_module_input_transforms_additional_property_type_1_type import ( + OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType1Type, +) +from .open_flow_w_path_value_failure_module_retry import OpenFlowWPathValueFailureModuleRetry +from .open_flow_w_path_value_failure_module_retry_constant import OpenFlowWPathValueFailureModuleRetryConstant +from .open_flow_w_path_value_failure_module_retry_exponential import OpenFlowWPathValueFailureModuleRetryExponential +from .open_flow_w_path_value_failure_module_sleep_type_0 import OpenFlowWPathValueFailureModuleSleepType0 +from .open_flow_w_path_value_failure_module_sleep_type_0_type import OpenFlowWPathValueFailureModuleSleepType0Type +from .open_flow_w_path_value_failure_module_sleep_type_1 import OpenFlowWPathValueFailureModuleSleepType1 +from .open_flow_w_path_value_failure_module_sleep_type_1_type import OpenFlowWPathValueFailureModuleSleepType1Type +from .open_flow_w_path_value_failure_module_stop_after_if import OpenFlowWPathValueFailureModuleStopAfterIf +from .open_flow_w_path_value_failure_module_value_type_0 import OpenFlowWPathValueFailureModuleValueType0 +from .open_flow_w_path_value_failure_module_value_type_0_language import ( + OpenFlowWPathValueFailureModuleValueType0Language, +) +from .open_flow_w_path_value_failure_module_value_type_1 import OpenFlowWPathValueFailureModuleValueType1 +from .open_flow_w_path_value_failure_module_value_type_1_type import OpenFlowWPathValueFailureModuleValueType1Type +from .open_flow_w_path_value_failure_module_value_type_2 import OpenFlowWPathValueFailureModuleValueType2 +from .open_flow_w_path_value_failure_module_value_type_2_iterator_type_0 import ( + OpenFlowWPathValueFailureModuleValueType2IteratorType0, +) +from .open_flow_w_path_value_failure_module_value_type_2_iterator_type_0_type import ( + OpenFlowWPathValueFailureModuleValueType2IteratorType0Type, +) +from .open_flow_w_path_value_failure_module_value_type_2_iterator_type_1 import ( + OpenFlowWPathValueFailureModuleValueType2IteratorType1, +) +from .open_flow_w_path_value_failure_module_value_type_2_iterator_type_1_type import ( + OpenFlowWPathValueFailureModuleValueType2IteratorType1Type, +) +from .open_flow_w_path_value_failure_module_value_type_2_type import OpenFlowWPathValueFailureModuleValueType2Type +from .open_flow_w_path_value_failure_module_value_type_3 import OpenFlowWPathValueFailureModuleValueType3 +from .open_flow_w_path_value_failure_module_value_type_3_type import OpenFlowWPathValueFailureModuleValueType3Type +from .open_flow_w_path_value_modules_item import OpenFlowWPathValueModulesItem +from .open_flow_w_path_value_modules_item_input_transforms import OpenFlowWPathValueModulesItemInputTransforms +from .open_flow_w_path_value_modules_item_input_transforms_additional_property_type_0 import ( + OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType0, +) +from .open_flow_w_path_value_modules_item_input_transforms_additional_property_type_0_type import ( + OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType0Type, +) +from .open_flow_w_path_value_modules_item_input_transforms_additional_property_type_1 import ( + OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType1, +) +from .open_flow_w_path_value_modules_item_input_transforms_additional_property_type_1_type import ( + OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType1Type, +) +from .open_flow_w_path_value_modules_item_retry import OpenFlowWPathValueModulesItemRetry +from .open_flow_w_path_value_modules_item_retry_constant import OpenFlowWPathValueModulesItemRetryConstant +from .open_flow_w_path_value_modules_item_retry_exponential import OpenFlowWPathValueModulesItemRetryExponential +from .open_flow_w_path_value_modules_item_sleep_type_0 import OpenFlowWPathValueModulesItemSleepType0 +from .open_flow_w_path_value_modules_item_sleep_type_0_type import OpenFlowWPathValueModulesItemSleepType0Type +from .open_flow_w_path_value_modules_item_sleep_type_1 import OpenFlowWPathValueModulesItemSleepType1 +from .open_flow_w_path_value_modules_item_sleep_type_1_type import OpenFlowWPathValueModulesItemSleepType1Type +from .open_flow_w_path_value_modules_item_stop_after_if import OpenFlowWPathValueModulesItemStopAfterIf +from .open_flow_w_path_value_modules_item_value_type_0 import OpenFlowWPathValueModulesItemValueType0 +from .open_flow_w_path_value_modules_item_value_type_0_language import OpenFlowWPathValueModulesItemValueType0Language +from .open_flow_w_path_value_modules_item_value_type_1 import OpenFlowWPathValueModulesItemValueType1 +from .open_flow_w_path_value_modules_item_value_type_1_type import OpenFlowWPathValueModulesItemValueType1Type +from .open_flow_w_path_value_modules_item_value_type_2 import OpenFlowWPathValueModulesItemValueType2 +from .open_flow_w_path_value_modules_item_value_type_2_iterator_type_0 import ( + OpenFlowWPathValueModulesItemValueType2IteratorType0, +) +from .open_flow_w_path_value_modules_item_value_type_2_iterator_type_0_type import ( + OpenFlowWPathValueModulesItemValueType2IteratorType0Type, +) +from .open_flow_w_path_value_modules_item_value_type_2_iterator_type_1 import ( + OpenFlowWPathValueModulesItemValueType2IteratorType1, +) +from .open_flow_w_path_value_modules_item_value_type_2_iterator_type_1_type import ( + OpenFlowWPathValueModulesItemValueType2IteratorType1Type, +) +from .open_flow_w_path_value_modules_item_value_type_2_type import OpenFlowWPathValueModulesItemValueType2Type +from .open_flow_w_path_value_modules_item_value_type_3 import OpenFlowWPathValueModulesItemValueType3 +from .open_flow_w_path_value_modules_item_value_type_3_type import OpenFlowWPathValueModulesItemValueType3Type +from .path_flow import PathFlow +from .path_flow_type import PathFlowType +from .path_script import PathScript +from .path_script_type import PathScriptType +from .preview import Preview +from .preview_args import PreviewArgs +from .preview_language import PreviewLanguage +from .preview_schedule_json_body import PreviewScheduleJsonBody +from .python_to_jsonschema_response_200 import PythonToJsonschemaResponse200 +from .python_to_jsonschema_response_200_args_item import PythonToJsonschemaResponse200ArgsItem +from .python_to_jsonschema_response_200_args_item_typ_type_0 import PythonToJsonschemaResponse200ArgsItemTypType0 +from .python_to_jsonschema_response_200_args_item_typ_type_1 import PythonToJsonschemaResponse200ArgsItemTypType1 +from .python_to_jsonschema_response_200_args_item_typ_type_2 import PythonToJsonschemaResponse200ArgsItemTypType2 +from .python_to_jsonschema_response_200_args_item_typ_type_3 import PythonToJsonschemaResponse200ArgsItemTypType3 +from .python_to_jsonschema_response_200_args_item_typ_type_3_object_item import ( + PythonToJsonschemaResponse200ArgsItemTypType3ObjectItem, +) +from .python_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_0 import ( + PythonToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0, +) +from .python_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1 import ( + PythonToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1, +) +from .python_to_jsonschema_response_200_args_item_typ_type_4 import PythonToJsonschemaResponse200ArgsItemTypType4 +from .python_to_jsonschema_response_200_args_item_typ_type_4_list_type_0 import ( + PythonToJsonschemaResponse200ArgsItemTypType4ListType0, +) +from .python_to_jsonschema_response_200_args_item_typ_type_4_list_type_1 import ( + PythonToJsonschemaResponse200ArgsItemTypType4ListType1, +) +from .queued_job import QueuedJob +from .queued_job_args import QueuedJobArgs +from .queued_job_flow_status import QueuedJobFlowStatus +from .queued_job_flow_status_failure_module import QueuedJobFlowStatusFailureModule +from .queued_job_flow_status_failure_module_iterator import QueuedJobFlowStatusFailureModuleIterator +from .queued_job_flow_status_failure_module_type import QueuedJobFlowStatusFailureModuleType +from .queued_job_flow_status_modules_item import QueuedJobFlowStatusModulesItem +from .queued_job_flow_status_modules_item_iterator import QueuedJobFlowStatusModulesItemIterator +from .queued_job_flow_status_modules_item_type import QueuedJobFlowStatusModulesItemType +from .queued_job_flow_status_retry import QueuedJobFlowStatusRetry +from .queued_job_job_kind import QueuedJobJobKind +from .queued_job_language import QueuedJobLanguage +from .queued_job_raw_flow import QueuedJobRawFlow +from .queued_job_raw_flow_failure_module import QueuedJobRawFlowFailureModule +from .queued_job_raw_flow_failure_module_input_transforms import QueuedJobRawFlowFailureModuleInputTransforms +from .queued_job_raw_flow_failure_module_input_transforms_additional_property_type_0 import ( + QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0, +) +from .queued_job_raw_flow_failure_module_input_transforms_additional_property_type_0_type import ( + QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from .queued_job_raw_flow_failure_module_input_transforms_additional_property_type_1 import ( + QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1, +) +from .queued_job_raw_flow_failure_module_input_transforms_additional_property_type_1_type import ( + QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type, +) +from .queued_job_raw_flow_failure_module_retry import QueuedJobRawFlowFailureModuleRetry +from .queued_job_raw_flow_failure_module_retry_constant import QueuedJobRawFlowFailureModuleRetryConstant +from .queued_job_raw_flow_failure_module_retry_exponential import QueuedJobRawFlowFailureModuleRetryExponential +from .queued_job_raw_flow_failure_module_sleep_type_0 import QueuedJobRawFlowFailureModuleSleepType0 +from .queued_job_raw_flow_failure_module_sleep_type_0_type import QueuedJobRawFlowFailureModuleSleepType0Type +from .queued_job_raw_flow_failure_module_sleep_type_1 import QueuedJobRawFlowFailureModuleSleepType1 +from .queued_job_raw_flow_failure_module_sleep_type_1_type import QueuedJobRawFlowFailureModuleSleepType1Type +from .queued_job_raw_flow_failure_module_stop_after_if import QueuedJobRawFlowFailureModuleStopAfterIf +from .queued_job_raw_flow_failure_module_value_type_0 import QueuedJobRawFlowFailureModuleValueType0 +from .queued_job_raw_flow_failure_module_value_type_0_language import QueuedJobRawFlowFailureModuleValueType0Language +from .queued_job_raw_flow_failure_module_value_type_1 import QueuedJobRawFlowFailureModuleValueType1 +from .queued_job_raw_flow_failure_module_value_type_1_type import QueuedJobRawFlowFailureModuleValueType1Type +from .queued_job_raw_flow_failure_module_value_type_2 import QueuedJobRawFlowFailureModuleValueType2 +from .queued_job_raw_flow_failure_module_value_type_2_iterator_type_0 import ( + QueuedJobRawFlowFailureModuleValueType2IteratorType0, +) +from .queued_job_raw_flow_failure_module_value_type_2_iterator_type_0_type import ( + QueuedJobRawFlowFailureModuleValueType2IteratorType0Type, +) +from .queued_job_raw_flow_failure_module_value_type_2_iterator_type_1 import ( + QueuedJobRawFlowFailureModuleValueType2IteratorType1, +) +from .queued_job_raw_flow_failure_module_value_type_2_iterator_type_1_type import ( + QueuedJobRawFlowFailureModuleValueType2IteratorType1Type, +) +from .queued_job_raw_flow_failure_module_value_type_2_type import QueuedJobRawFlowFailureModuleValueType2Type +from .queued_job_raw_flow_failure_module_value_type_3 import QueuedJobRawFlowFailureModuleValueType3 +from .queued_job_raw_flow_failure_module_value_type_3_type import QueuedJobRawFlowFailureModuleValueType3Type +from .queued_job_raw_flow_modules_item import QueuedJobRawFlowModulesItem +from .queued_job_raw_flow_modules_item_input_transforms import QueuedJobRawFlowModulesItemInputTransforms +from .queued_job_raw_flow_modules_item_input_transforms_additional_property_type_0 import ( + QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0, +) +from .queued_job_raw_flow_modules_item_input_transforms_additional_property_type_0_type import ( + QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0Type, +) +from .queued_job_raw_flow_modules_item_input_transforms_additional_property_type_1 import ( + QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1, +) +from .queued_job_raw_flow_modules_item_input_transforms_additional_property_type_1_type import ( + QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1Type, +) +from .queued_job_raw_flow_modules_item_retry import QueuedJobRawFlowModulesItemRetry +from .queued_job_raw_flow_modules_item_retry_constant import QueuedJobRawFlowModulesItemRetryConstant +from .queued_job_raw_flow_modules_item_retry_exponential import QueuedJobRawFlowModulesItemRetryExponential +from .queued_job_raw_flow_modules_item_sleep_type_0 import QueuedJobRawFlowModulesItemSleepType0 +from .queued_job_raw_flow_modules_item_sleep_type_0_type import QueuedJobRawFlowModulesItemSleepType0Type +from .queued_job_raw_flow_modules_item_sleep_type_1 import QueuedJobRawFlowModulesItemSleepType1 +from .queued_job_raw_flow_modules_item_sleep_type_1_type import QueuedJobRawFlowModulesItemSleepType1Type +from .queued_job_raw_flow_modules_item_stop_after_if import QueuedJobRawFlowModulesItemStopAfterIf +from .queued_job_raw_flow_modules_item_value_type_0 import QueuedJobRawFlowModulesItemValueType0 +from .queued_job_raw_flow_modules_item_value_type_0_language import QueuedJobRawFlowModulesItemValueType0Language +from .queued_job_raw_flow_modules_item_value_type_1 import QueuedJobRawFlowModulesItemValueType1 +from .queued_job_raw_flow_modules_item_value_type_1_type import QueuedJobRawFlowModulesItemValueType1Type +from .queued_job_raw_flow_modules_item_value_type_2 import QueuedJobRawFlowModulesItemValueType2 +from .queued_job_raw_flow_modules_item_value_type_2_iterator_type_0 import ( + QueuedJobRawFlowModulesItemValueType2IteratorType0, +) +from .queued_job_raw_flow_modules_item_value_type_2_iterator_type_0_type import ( + QueuedJobRawFlowModulesItemValueType2IteratorType0Type, +) +from .queued_job_raw_flow_modules_item_value_type_2_iterator_type_1 import ( + QueuedJobRawFlowModulesItemValueType2IteratorType1, +) +from .queued_job_raw_flow_modules_item_value_type_2_iterator_type_1_type import ( + QueuedJobRawFlowModulesItemValueType2IteratorType1Type, +) +from .queued_job_raw_flow_modules_item_value_type_2_type import QueuedJobRawFlowModulesItemValueType2Type +from .queued_job_raw_flow_modules_item_value_type_3 import QueuedJobRawFlowModulesItemValueType3 +from .queued_job_raw_flow_modules_item_value_type_3_type import QueuedJobRawFlowModulesItemValueType3Type +from .raw_script import RawScript +from .raw_script_language import RawScriptLanguage +from .refresh_token_json_body import RefreshTokenJsonBody +from .remove_granular_acls_json_body import RemoveGranularAclsJsonBody +from .remove_granular_acls_kind import RemoveGranularAclsKind +from .remove_user_to_group_json_body import RemoveUserToGroupJsonBody +from .resource import Resource +from .resource_extra_perms import ResourceExtraPerms +from .resource_type import ResourceType +from .resource_value import ResourceValue +from .resume_suspended_job_json_body import ResumeSuspendedJobJsonBody +from .resume_suspended_job_payload import ResumeSuspendedJobPayload +from .retry import Retry +from .retry_constant import RetryConstant +from .retry_exponential import RetryExponential +from .run_flow_by_path_json_body import RunFlowByPathJsonBody +from .run_flow_preview_json_body import RunFlowPreviewJsonBody +from .run_flow_preview_json_body_args import RunFlowPreviewJsonBodyArgs +from .run_flow_preview_json_body_value import RunFlowPreviewJsonBodyValue +from .run_flow_preview_json_body_value_failure_module import RunFlowPreviewJsonBodyValueFailureModule +from .run_flow_preview_json_body_value_failure_module_input_transforms import ( + RunFlowPreviewJsonBodyValueFailureModuleInputTransforms, +) +from .run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_0 import ( + RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0, +) +from .run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_0_type import ( + RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from .run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_1 import ( + RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1, +) +from .run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_1_type import ( + RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1Type, +) +from .run_flow_preview_json_body_value_failure_module_retry import RunFlowPreviewJsonBodyValueFailureModuleRetry +from .run_flow_preview_json_body_value_failure_module_retry_constant import ( + RunFlowPreviewJsonBodyValueFailureModuleRetryConstant, +) +from .run_flow_preview_json_body_value_failure_module_retry_exponential import ( + RunFlowPreviewJsonBodyValueFailureModuleRetryExponential, +) +from .run_flow_preview_json_body_value_failure_module_sleep_type_0 import ( + RunFlowPreviewJsonBodyValueFailureModuleSleepType0, +) +from .run_flow_preview_json_body_value_failure_module_sleep_type_0_type import ( + RunFlowPreviewJsonBodyValueFailureModuleSleepType0Type, +) +from .run_flow_preview_json_body_value_failure_module_sleep_type_1 import ( + RunFlowPreviewJsonBodyValueFailureModuleSleepType1, +) +from .run_flow_preview_json_body_value_failure_module_sleep_type_1_type import ( + RunFlowPreviewJsonBodyValueFailureModuleSleepType1Type, +) +from .run_flow_preview_json_body_value_failure_module_stop_after_if import ( + RunFlowPreviewJsonBodyValueFailureModuleStopAfterIf, +) +from .run_flow_preview_json_body_value_failure_module_value_type_0 import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType0, +) +from .run_flow_preview_json_body_value_failure_module_value_type_0_language import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType0Language, +) +from .run_flow_preview_json_body_value_failure_module_value_type_1 import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType1, +) +from .run_flow_preview_json_body_value_failure_module_value_type_1_type import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType1Type, +) +from .run_flow_preview_json_body_value_failure_module_value_type_2 import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType2, +) +from .run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_0 import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType0, +) +from .run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_0_type import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType0Type, +) +from .run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_1 import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType1, +) +from .run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_1_type import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType1Type, +) +from .run_flow_preview_json_body_value_failure_module_value_type_2_type import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType2Type, +) +from .run_flow_preview_json_body_value_failure_module_value_type_3 import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType3, +) +from .run_flow_preview_json_body_value_failure_module_value_type_3_type import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType3Type, +) +from .run_flow_preview_json_body_value_modules_item import RunFlowPreviewJsonBodyValueModulesItem +from .run_flow_preview_json_body_value_modules_item_input_transforms import ( + RunFlowPreviewJsonBodyValueModulesItemInputTransforms, +) +from .run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_0 import ( + RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0, +) +from .run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_0_type import ( + RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0Type, +) +from .run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_1 import ( + RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1, +) +from .run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_1_type import ( + RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1Type, +) +from .run_flow_preview_json_body_value_modules_item_retry import RunFlowPreviewJsonBodyValueModulesItemRetry +from .run_flow_preview_json_body_value_modules_item_retry_constant import ( + RunFlowPreviewJsonBodyValueModulesItemRetryConstant, +) +from .run_flow_preview_json_body_value_modules_item_retry_exponential import ( + RunFlowPreviewJsonBodyValueModulesItemRetryExponential, +) +from .run_flow_preview_json_body_value_modules_item_sleep_type_0 import RunFlowPreviewJsonBodyValueModulesItemSleepType0 +from .run_flow_preview_json_body_value_modules_item_sleep_type_0_type import ( + RunFlowPreviewJsonBodyValueModulesItemSleepType0Type, +) +from .run_flow_preview_json_body_value_modules_item_sleep_type_1 import RunFlowPreviewJsonBodyValueModulesItemSleepType1 +from .run_flow_preview_json_body_value_modules_item_sleep_type_1_type import ( + RunFlowPreviewJsonBodyValueModulesItemSleepType1Type, +) +from .run_flow_preview_json_body_value_modules_item_stop_after_if import ( + RunFlowPreviewJsonBodyValueModulesItemStopAfterIf, +) +from .run_flow_preview_json_body_value_modules_item_value_type_0 import RunFlowPreviewJsonBodyValueModulesItemValueType0 +from .run_flow_preview_json_body_value_modules_item_value_type_0_language import ( + RunFlowPreviewJsonBodyValueModulesItemValueType0Language, +) +from .run_flow_preview_json_body_value_modules_item_value_type_1 import RunFlowPreviewJsonBodyValueModulesItemValueType1 +from .run_flow_preview_json_body_value_modules_item_value_type_1_type import ( + RunFlowPreviewJsonBodyValueModulesItemValueType1Type, +) +from .run_flow_preview_json_body_value_modules_item_value_type_2 import RunFlowPreviewJsonBodyValueModulesItemValueType2 +from .run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_0 import ( + RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType0, +) +from .run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_0_type import ( + RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType0Type, +) +from .run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_1 import ( + RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType1, +) +from .run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_1_type import ( + RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType1Type, +) +from .run_flow_preview_json_body_value_modules_item_value_type_2_type import ( + RunFlowPreviewJsonBodyValueModulesItemValueType2Type, +) +from .run_flow_preview_json_body_value_modules_item_value_type_3 import RunFlowPreviewJsonBodyValueModulesItemValueType3 +from .run_flow_preview_json_body_value_modules_item_value_type_3_type import ( + RunFlowPreviewJsonBodyValueModulesItemValueType3Type, +) +from .run_script_by_hash_json_body import RunScriptByHashJsonBody +from .run_script_by_path_json_body import RunScriptByPathJsonBody +from .run_script_preview_json_body import RunScriptPreviewJsonBody +from .run_script_preview_json_body_args import RunScriptPreviewJsonBodyArgs +from .run_script_preview_json_body_language import RunScriptPreviewJsonBodyLanguage +from .run_wait_result_script_by_path_json_body import RunWaitResultScriptByPathJsonBody +from .schedule import Schedule +from .schedule_args import ScheduleArgs +from .schedule_extra_perms import ScheduleExtraPerms +from .script import Script +from .script_args import ScriptArgs +from .script_extra_perms import ScriptExtraPerms +from .script_kind import ScriptKind +from .script_language import ScriptLanguage +from .script_schema import ScriptSchema +from .set_password_json_body import SetPasswordJsonBody +from .set_schedule_enabled_json_body import SetScheduleEnabledJsonBody +from .set_workspace_slack_json_body import SetWorkspaceSlackJsonBody +from .set_workspace_slack_json_body_bot import SetWorkspaceSlackJsonBodyBot +from .slack_token import SlackToken +from .slack_token_bot import SlackTokenBot +from .static_transform import StaticTransform +from .static_transform_type import StaticTransformType +from .token_response import TokenResponse +from .truncated_token import TruncatedToken +from .update_flow_json_body import UpdateFlowJsonBody +from .update_flow_json_body_schema import UpdateFlowJsonBodySchema +from .update_flow_json_body_value import UpdateFlowJsonBodyValue +from .update_flow_json_body_value_failure_module import UpdateFlowJsonBodyValueFailureModule +from .update_flow_json_body_value_failure_module_input_transforms import ( + UpdateFlowJsonBodyValueFailureModuleInputTransforms, +) +from .update_flow_json_body_value_failure_module_input_transforms_additional_property_type_0 import ( + UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0, +) +from .update_flow_json_body_value_failure_module_input_transforms_additional_property_type_0_type import ( + UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from .update_flow_json_body_value_failure_module_input_transforms_additional_property_type_1 import ( + UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1, +) +from .update_flow_json_body_value_failure_module_input_transforms_additional_property_type_1_type import ( + UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1Type, +) +from .update_flow_json_body_value_failure_module_retry import UpdateFlowJsonBodyValueFailureModuleRetry +from .update_flow_json_body_value_failure_module_retry_constant import UpdateFlowJsonBodyValueFailureModuleRetryConstant +from .update_flow_json_body_value_failure_module_retry_exponential import ( + UpdateFlowJsonBodyValueFailureModuleRetryExponential, +) +from .update_flow_json_body_value_failure_module_sleep_type_0 import UpdateFlowJsonBodyValueFailureModuleSleepType0 +from .update_flow_json_body_value_failure_module_sleep_type_0_type import ( + UpdateFlowJsonBodyValueFailureModuleSleepType0Type, +) +from .update_flow_json_body_value_failure_module_sleep_type_1 import UpdateFlowJsonBodyValueFailureModuleSleepType1 +from .update_flow_json_body_value_failure_module_sleep_type_1_type import ( + UpdateFlowJsonBodyValueFailureModuleSleepType1Type, +) +from .update_flow_json_body_value_failure_module_stop_after_if import UpdateFlowJsonBodyValueFailureModuleStopAfterIf +from .update_flow_json_body_value_failure_module_value_type_0 import UpdateFlowJsonBodyValueFailureModuleValueType0 +from .update_flow_json_body_value_failure_module_value_type_0_language import ( + UpdateFlowJsonBodyValueFailureModuleValueType0Language, +) +from .update_flow_json_body_value_failure_module_value_type_1 import UpdateFlowJsonBodyValueFailureModuleValueType1 +from .update_flow_json_body_value_failure_module_value_type_1_type import ( + UpdateFlowJsonBodyValueFailureModuleValueType1Type, +) +from .update_flow_json_body_value_failure_module_value_type_2 import UpdateFlowJsonBodyValueFailureModuleValueType2 +from .update_flow_json_body_value_failure_module_value_type_2_iterator_type_0 import ( + UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType0, +) +from .update_flow_json_body_value_failure_module_value_type_2_iterator_type_0_type import ( + UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType0Type, +) +from .update_flow_json_body_value_failure_module_value_type_2_iterator_type_1 import ( + UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType1, +) +from .update_flow_json_body_value_failure_module_value_type_2_iterator_type_1_type import ( + UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType1Type, +) +from .update_flow_json_body_value_failure_module_value_type_2_type import ( + UpdateFlowJsonBodyValueFailureModuleValueType2Type, +) +from .update_flow_json_body_value_failure_module_value_type_3 import UpdateFlowJsonBodyValueFailureModuleValueType3 +from .update_flow_json_body_value_failure_module_value_type_3_type import ( + UpdateFlowJsonBodyValueFailureModuleValueType3Type, +) +from .update_flow_json_body_value_modules_item import UpdateFlowJsonBodyValueModulesItem +from .update_flow_json_body_value_modules_item_input_transforms import UpdateFlowJsonBodyValueModulesItemInputTransforms +from .update_flow_json_body_value_modules_item_input_transforms_additional_property_type_0 import ( + UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0, +) +from .update_flow_json_body_value_modules_item_input_transforms_additional_property_type_0_type import ( + UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0Type, +) +from .update_flow_json_body_value_modules_item_input_transforms_additional_property_type_1 import ( + UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1, +) +from .update_flow_json_body_value_modules_item_input_transforms_additional_property_type_1_type import ( + UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1Type, +) +from .update_flow_json_body_value_modules_item_retry import UpdateFlowJsonBodyValueModulesItemRetry +from .update_flow_json_body_value_modules_item_retry_constant import UpdateFlowJsonBodyValueModulesItemRetryConstant +from .update_flow_json_body_value_modules_item_retry_exponential import ( + UpdateFlowJsonBodyValueModulesItemRetryExponential, +) +from .update_flow_json_body_value_modules_item_sleep_type_0 import UpdateFlowJsonBodyValueModulesItemSleepType0 +from .update_flow_json_body_value_modules_item_sleep_type_0_type import UpdateFlowJsonBodyValueModulesItemSleepType0Type +from .update_flow_json_body_value_modules_item_sleep_type_1 import UpdateFlowJsonBodyValueModulesItemSleepType1 +from .update_flow_json_body_value_modules_item_sleep_type_1_type import UpdateFlowJsonBodyValueModulesItemSleepType1Type +from .update_flow_json_body_value_modules_item_stop_after_if import UpdateFlowJsonBodyValueModulesItemStopAfterIf +from .update_flow_json_body_value_modules_item_value_type_0 import UpdateFlowJsonBodyValueModulesItemValueType0 +from .update_flow_json_body_value_modules_item_value_type_0_language import ( + UpdateFlowJsonBodyValueModulesItemValueType0Language, +) +from .update_flow_json_body_value_modules_item_value_type_1 import UpdateFlowJsonBodyValueModulesItemValueType1 +from .update_flow_json_body_value_modules_item_value_type_1_type import UpdateFlowJsonBodyValueModulesItemValueType1Type +from .update_flow_json_body_value_modules_item_value_type_2 import UpdateFlowJsonBodyValueModulesItemValueType2 +from .update_flow_json_body_value_modules_item_value_type_2_iterator_type_0 import ( + UpdateFlowJsonBodyValueModulesItemValueType2IteratorType0, +) +from .update_flow_json_body_value_modules_item_value_type_2_iterator_type_0_type import ( + UpdateFlowJsonBodyValueModulesItemValueType2IteratorType0Type, +) +from .update_flow_json_body_value_modules_item_value_type_2_iterator_type_1 import ( + UpdateFlowJsonBodyValueModulesItemValueType2IteratorType1, +) +from .update_flow_json_body_value_modules_item_value_type_2_iterator_type_1_type import ( + UpdateFlowJsonBodyValueModulesItemValueType2IteratorType1Type, +) +from .update_flow_json_body_value_modules_item_value_type_2_type import UpdateFlowJsonBodyValueModulesItemValueType2Type +from .update_flow_json_body_value_modules_item_value_type_3 import UpdateFlowJsonBodyValueModulesItemValueType3 +from .update_flow_json_body_value_modules_item_value_type_3_type import UpdateFlowJsonBodyValueModulesItemValueType3Type +from .update_group_json_body import UpdateGroupJsonBody +from .update_resource_json_body import UpdateResourceJsonBody +from .update_resource_json_body_value import UpdateResourceJsonBodyValue +from .update_resource_type_json_body import UpdateResourceTypeJsonBody +from .update_schedule_json_body import UpdateScheduleJsonBody +from .update_schedule_json_body_args import UpdateScheduleJsonBodyArgs +from .update_user_json_body import UpdateUserJsonBody +from .update_variable_json_body import UpdateVariableJsonBody +from .usage import Usage +from .user import User +from .user_usage import UserUsage +from .user_workspace_list import UserWorkspaceList +from .user_workspace_list_workspaces_item import UserWorkspaceListWorkspacesItem +from .whoami_response_200 import WhoamiResponse200 +from .whoami_response_200_usage import WhoamiResponse200Usage +from .whois_response_200 import WhoisResponse200 +from .whois_response_200_usage import WhoisResponse200Usage +from .worker_ping import WorkerPing +from .workspace import Workspace +from .workspace_invite import WorkspaceInvite diff --git a/python-client/windmill-api/windmill_api/models/accept_invite_json_body.py b/python-client/windmill-api/windmill_api/models/accept_invite_json_body.py new file mode 100644 index 0000000000..1eda347ea6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/accept_invite_json_body.py @@ -0,0 +1,64 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="AcceptInviteJsonBody") + + +@attr.s(auto_attribs=True) +class AcceptInviteJsonBody: + """ + Attributes: + workspace_id (str): + username (str): + """ + + workspace_id: str + username: str + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + workspace_id = self.workspace_id + username = self.username + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "workspace_id": workspace_id, + "username": username, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + workspace_id = d.pop("workspace_id") + + username = d.pop("username") + + accept_invite_json_body = cls( + workspace_id=workspace_id, + username=username, + ) + + accept_invite_json_body.additional_properties = d + return accept_invite_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/add_granular_acls_json_body.py b/python-client/windmill-api/windmill_api/models/add_granular_acls_json_body.py new file mode 100644 index 0000000000..da6d6a0370 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/add_granular_acls_json_body.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AddGranularAclsJsonBody") + + +@attr.s(auto_attribs=True) +class AddGranularAclsJsonBody: + """ + Attributes: + owner (str): + write (Union[Unset, bool]): + """ + + owner: str + write: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + owner = self.owner + write = self.write + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "owner": owner, + } + ) + if write is not UNSET: + field_dict["write"] = write + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + owner = d.pop("owner") + + write = d.pop("write", UNSET) + + add_granular_acls_json_body = cls( + owner=owner, + write=write, + ) + + add_granular_acls_json_body.additional_properties = d + return add_granular_acls_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/add_granular_acls_kind.py b/python-client/windmill-api/windmill_api/models/add_granular_acls_kind.py new file mode 100644 index 0000000000..537a04cec5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/add_granular_acls_kind.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class AddGranularAclsKind(str, Enum): + SCRIPT = "script" + GROUP = "group_" + RESOURCE = "resource" + SCHEDULE = "schedule" + VARIABLE = "variable" + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/add_user_to_group_json_body.py b/python-client/windmill-api/windmill_api/models/add_user_to_group_json_body.py new file mode 100644 index 0000000000..2cbd458deb --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/add_user_to_group_json_body.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AddUserToGroupJsonBody") + + +@attr.s(auto_attribs=True) +class AddUserToGroupJsonBody: + """ + Attributes: + username (Union[Unset, str]): + """ + + username: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + username = self.username + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if username is not UNSET: + field_dict["username"] = username + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + username = d.pop("username", UNSET) + + add_user_to_group_json_body = cls( + username=username, + ) + + add_user_to_group_json_body.additional_properties = d + return add_user_to_group_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/archive_script_by_hash_response_200.py b/python-client/windmill-api/windmill_api/models/archive_script_by_hash_response_200.py new file mode 100644 index 0000000000..e89ed898e6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/archive_script_by_hash_response_200.py @@ -0,0 +1,206 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr +from dateutil.parser import isoparse + +from ..models.archive_script_by_hash_response_200_extra_perms import ArchiveScriptByHashResponse200ExtraPerms +from ..models.archive_script_by_hash_response_200_kind import ArchiveScriptByHashResponse200Kind +from ..models.archive_script_by_hash_response_200_language import ArchiveScriptByHashResponse200Language +from ..models.archive_script_by_hash_response_200_schema import ArchiveScriptByHashResponse200Schema +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ArchiveScriptByHashResponse200") + + +@attr.s(auto_attribs=True) +class ArchiveScriptByHashResponse200: + """ + Attributes: + hash_ (str): + path (str): + summary (str): + content (str): + created_by (str): + created_at (datetime.datetime): + archived (bool): + deleted (bool): + is_template (bool): + extra_perms (ArchiveScriptByHashResponse200ExtraPerms): + language (ArchiveScriptByHashResponse200Language): + kind (ArchiveScriptByHashResponse200Kind): + workspace_id (Union[Unset, str]): + parent_hashes (Union[Unset, List[str]]): The first element is the direct parent of the script, the second is the + parent of the first, etc + description (Union[Unset, str]): + schema (Union[Unset, ArchiveScriptByHashResponse200Schema]): + lock (Union[Unset, str]): + lock_error_logs (Union[Unset, str]): + """ + + hash_: str + path: str + summary: str + content: str + created_by: str + created_at: datetime.datetime + archived: bool + deleted: bool + is_template: bool + extra_perms: ArchiveScriptByHashResponse200ExtraPerms + language: ArchiveScriptByHashResponse200Language + kind: ArchiveScriptByHashResponse200Kind + workspace_id: Union[Unset, str] = UNSET + parent_hashes: Union[Unset, List[str]] = UNSET + description: Union[Unset, str] = UNSET + schema: Union[Unset, ArchiveScriptByHashResponse200Schema] = UNSET + lock: Union[Unset, str] = UNSET + lock_error_logs: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + hash_ = self.hash_ + path = self.path + summary = self.summary + content = self.content + created_by = self.created_by + created_at = self.created_at.isoformat() + + archived = self.archived + deleted = self.deleted + is_template = self.is_template + extra_perms = self.extra_perms.to_dict() + + language = self.language.value + + kind = self.kind.value + + workspace_id = self.workspace_id + parent_hashes: Union[Unset, List[str]] = UNSET + if not isinstance(self.parent_hashes, Unset): + parent_hashes = self.parent_hashes + + description = self.description + schema: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.schema, Unset): + schema = self.schema.to_dict() + + lock = self.lock + lock_error_logs = self.lock_error_logs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "hash": hash_, + "path": path, + "summary": summary, + "content": content, + "created_by": created_by, + "created_at": created_at, + "archived": archived, + "deleted": deleted, + "is_template": is_template, + "extra_perms": extra_perms, + "language": language, + "kind": kind, + } + ) + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if parent_hashes is not UNSET: + field_dict["parent_hashes"] = parent_hashes + if description is not UNSET: + field_dict["description"] = description + if schema is not UNSET: + field_dict["schema"] = schema + if lock is not UNSET: + field_dict["lock"] = lock + if lock_error_logs is not UNSET: + field_dict["lock_error_logs"] = lock_error_logs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + hash_ = d.pop("hash") + + path = d.pop("path") + + summary = d.pop("summary") + + content = d.pop("content") + + created_by = d.pop("created_by") + + created_at = isoparse(d.pop("created_at")) + + archived = d.pop("archived") + + deleted = d.pop("deleted") + + is_template = d.pop("is_template") + + extra_perms = ArchiveScriptByHashResponse200ExtraPerms.from_dict(d.pop("extra_perms")) + + language = ArchiveScriptByHashResponse200Language(d.pop("language")) + + kind = ArchiveScriptByHashResponse200Kind(d.pop("kind")) + + workspace_id = d.pop("workspace_id", UNSET) + + parent_hashes = cast(List[str], d.pop("parent_hashes", UNSET)) + + description = d.pop("description", UNSET) + + _schema = d.pop("schema", UNSET) + schema: Union[Unset, ArchiveScriptByHashResponse200Schema] + if isinstance(_schema, Unset): + schema = UNSET + else: + schema = ArchiveScriptByHashResponse200Schema.from_dict(_schema) + + lock = d.pop("lock", UNSET) + + lock_error_logs = d.pop("lock_error_logs", UNSET) + + archive_script_by_hash_response_200 = cls( + hash_=hash_, + path=path, + summary=summary, + content=content, + created_by=created_by, + created_at=created_at, + archived=archived, + deleted=deleted, + is_template=is_template, + extra_perms=extra_perms, + language=language, + kind=kind, + workspace_id=workspace_id, + parent_hashes=parent_hashes, + description=description, + schema=schema, + lock=lock, + lock_error_logs=lock_error_logs, + ) + + archive_script_by_hash_response_200.additional_properties = d + return archive_script_by_hash_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/archive_script_by_hash_response_200_extra_perms.py b/python-client/windmill-api/windmill_api/models/archive_script_by_hash_response_200_extra_perms.py new file mode 100644 index 0000000000..e815276a26 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/archive_script_by_hash_response_200_extra_perms.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ArchiveScriptByHashResponse200ExtraPerms") + + +@attr.s(auto_attribs=True) +class ArchiveScriptByHashResponse200ExtraPerms: + """ """ + + additional_properties: Dict[str, bool] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + archive_script_by_hash_response_200_extra_perms = cls() + + archive_script_by_hash_response_200_extra_perms.additional_properties = d + return archive_script_by_hash_response_200_extra_perms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> bool: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: bool) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/archive_script_by_hash_response_200_kind.py b/python-client/windmill-api/windmill_api/models/archive_script_by_hash_response_200_kind.py new file mode 100644 index 0000000000..d3bad4c6b9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/archive_script_by_hash_response_200_kind.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class ArchiveScriptByHashResponse200Kind(str, Enum): + SCRIPT = "script" + FAILURE = "failure" + TRIGGER = "trigger" + COMMAND = "command" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/archive_script_by_hash_response_200_language.py b/python-client/windmill-api/windmill_api/models/archive_script_by_hash_response_200_language.py new file mode 100644 index 0000000000..a428e40cf7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/archive_script_by_hash_response_200_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ArchiveScriptByHashResponse200Language(str, Enum): + PYTHON3 = "python3" + DENO = "deno" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/archive_script_by_hash_response_200_schema.py b/python-client/windmill-api/windmill_api/models/archive_script_by_hash_response_200_schema.py new file mode 100644 index 0000000000..81a4da4ff5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/archive_script_by_hash_response_200_schema.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ArchiveScriptByHashResponse200Schema") + + +@attr.s(auto_attribs=True) +class ArchiveScriptByHashResponse200Schema: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + archive_script_by_hash_response_200_schema = cls() + + archive_script_by_hash_response_200_schema.additional_properties = d + return archive_script_by_hash_response_200_schema + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/audit_log.py b/python-client/windmill-api/windmill_api/models/audit_log.py new file mode 100644 index 0000000000..5e18b62550 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/audit_log.py @@ -0,0 +1,118 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.audit_log_action_kind import AuditLogActionKind +from ..models.audit_log_operation import AuditLogOperation +from ..models.audit_log_parameters import AuditLogParameters +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AuditLog") + + +@attr.s(auto_attribs=True) +class AuditLog: + """ + Attributes: + id (int): + timestamp (datetime.datetime): + username (str): + operation (AuditLogOperation): + action_kind (AuditLogActionKind): + resource (Union[Unset, str]): + parameters (Union[Unset, AuditLogParameters]): + """ + + id: int + timestamp: datetime.datetime + username: str + operation: AuditLogOperation + action_kind: AuditLogActionKind + resource: Union[Unset, str] = UNSET + parameters: Union[Unset, AuditLogParameters] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + timestamp = self.timestamp.isoformat() + + username = self.username + operation = self.operation.value + + action_kind = self.action_kind.value + + resource = self.resource + parameters: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.parameters, Unset): + parameters = self.parameters.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "timestamp": timestamp, + "username": username, + "operation": operation, + "action_kind": action_kind, + } + ) + if resource is not UNSET: + field_dict["resource"] = resource + if parameters is not UNSET: + field_dict["parameters"] = parameters + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id") + + timestamp = isoparse(d.pop("timestamp")) + + username = d.pop("username") + + operation = AuditLogOperation(d.pop("operation")) + + action_kind = AuditLogActionKind(d.pop("action_kind")) + + resource = d.pop("resource", UNSET) + + _parameters = d.pop("parameters", UNSET) + parameters: Union[Unset, AuditLogParameters] + if isinstance(_parameters, Unset): + parameters = UNSET + else: + parameters = AuditLogParameters.from_dict(_parameters) + + audit_log = cls( + id=id, + timestamp=timestamp, + username=username, + operation=operation, + action_kind=action_kind, + resource=resource, + parameters=parameters, + ) + + audit_log.additional_properties = d + return audit_log + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/audit_log_action_kind.py b/python-client/windmill-api/windmill_api/models/audit_log_action_kind.py new file mode 100644 index 0000000000..e71f40620f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/audit_log_action_kind.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class AuditLogActionKind(str, Enum): + CREATED = "Created" + UPDATED = "Updated" + DELETE = "Delete" + EXECUTE = "Execute" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/audit_log_operation.py b/python-client/windmill-api/windmill_api/models/audit_log_operation.py new file mode 100644 index 0000000000..d460f151ab --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/audit_log_operation.py @@ -0,0 +1,20 @@ +from enum import Enum + + +class AuditLogOperation(str, Enum): + JOBS_RUN = "jobs.run" + SCRIPTS_CREATE = "scripts.create" + SCRIPTS_UPDATE = "scripts.update" + USERS_CREATE = "users.create" + USERS_DELETE = "users.delete" + USERS_SETPASSWORD = "users.setpassword" + USERS_UPDATE = "users.update" + USERS_LOGIN = "users.login" + USERS_TOKEN_CREATE = "users.token.create" + USERS_TOKEN_DELETE = "users.token.delete" + VARIABLES_CREATE = "variables.create" + VARIABLES_DELETE = "variables.delete" + VARIABLES_UPDATE = "variables.update" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/audit_log_parameters.py b/python-client/windmill-api/windmill_api/models/audit_log_parameters.py new file mode 100644 index 0000000000..f2f0c54fe8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/audit_log_parameters.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="AuditLogParameters") + + +@attr.s(auto_attribs=True) +class AuditLogParameters: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + audit_log_parameters = cls() + + audit_log_parameters.additional_properties = d + return audit_log_parameters + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/cancel_queued_job_json_body.py b/python-client/windmill-api/windmill_api/models/cancel_queued_job_json_body.py new file mode 100644 index 0000000000..7e48ce17ec --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/cancel_queued_job_json_body.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CancelQueuedJobJsonBody") + + +@attr.s(auto_attribs=True) +class CancelQueuedJobJsonBody: + """ + Attributes: + reason (Union[Unset, str]): + """ + + reason: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + reason = self.reason + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if reason is not UNSET: + field_dict["reason"] = reason + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + reason = d.pop("reason", UNSET) + + cancel_queued_job_json_body = cls( + reason=reason, + ) + + cancel_queued_job_json_body.additional_properties = d + return cancel_queued_job_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/cancel_suspended_job_json_body.py b/python-client/windmill-api/windmill_api/models/cancel_suspended_job_json_body.py new file mode 100644 index 0000000000..e5763a0054 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/cancel_suspended_job_json_body.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="CancelSuspendedJobJsonBody") + + +@attr.s(auto_attribs=True) +class CancelSuspendedJobJsonBody: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + cancel_suspended_job_json_body = cls() + + cancel_suspended_job_json_body.additional_properties = d + return cancel_suspended_job_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/cancel_suspended_job_payload.py b/python-client/windmill-api/windmill_api/models/cancel_suspended_job_payload.py new file mode 100644 index 0000000000..dee3e11aeb --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/cancel_suspended_job_payload.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="CancelSuspendedJobPayload") + + +@attr.s(auto_attribs=True) +class CancelSuspendedJobPayload: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + cancel_suspended_job_payload = cls() + + cancel_suspended_job_payload.additional_properties = d + return cancel_suspended_job_payload + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job.py b/python-client/windmill-api/windmill_api/models/completed_job.py new file mode 100644 index 0000000000..7e968bde1c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job.py @@ -0,0 +1,300 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.completed_job_args import CompletedJobArgs +from ..models.completed_job_flow_status import CompletedJobFlowStatus +from ..models.completed_job_job_kind import CompletedJobJobKind +from ..models.completed_job_language import CompletedJobLanguage +from ..models.completed_job_raw_flow import CompletedJobRawFlow +from ..models.completed_job_result import CompletedJobResult +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJob") + + +@attr.s(auto_attribs=True) +class CompletedJob: + """ + Attributes: + id (str): + created_by (str): + created_at (datetime.datetime): + started_at (datetime.datetime): + duration_ms (int): + success (bool): + canceled (bool): + job_kind (CompletedJobJobKind): + permissioned_as (str): The user (u/userfoo) or group (g/groupfoo) whom + the execution of this script will be permissioned_as and by extension its DT_TOKEN. + is_flow_step (bool): + is_skipped (bool): + workspace_id (Union[Unset, str]): + parent_job (Union[Unset, str]): + script_path (Union[Unset, str]): + script_hash (Union[Unset, str]): + args (Union[Unset, CompletedJobArgs]): + result (Union[Unset, CompletedJobResult]): + logs (Union[Unset, str]): + deleted (Union[Unset, bool]): + raw_code (Union[Unset, str]): + canceled_by (Union[Unset, str]): + canceled_reason (Union[Unset, str]): + schedule_path (Union[Unset, str]): + flow_status (Union[Unset, CompletedJobFlowStatus]): + raw_flow (Union[Unset, CompletedJobRawFlow]): + language (Union[Unset, CompletedJobLanguage]): + """ + + id: str + created_by: str + created_at: datetime.datetime + started_at: datetime.datetime + duration_ms: int + success: bool + canceled: bool + job_kind: CompletedJobJobKind + permissioned_as: str + is_flow_step: bool + is_skipped: bool + workspace_id: Union[Unset, str] = UNSET + parent_job: Union[Unset, str] = UNSET + script_path: Union[Unset, str] = UNSET + script_hash: Union[Unset, str] = UNSET + args: Union[Unset, CompletedJobArgs] = UNSET + result: Union[Unset, CompletedJobResult] = UNSET + logs: Union[Unset, str] = UNSET + deleted: Union[Unset, bool] = UNSET + raw_code: Union[Unset, str] = UNSET + canceled_by: Union[Unset, str] = UNSET + canceled_reason: Union[Unset, str] = UNSET + schedule_path: Union[Unset, str] = UNSET + flow_status: Union[Unset, CompletedJobFlowStatus] = UNSET + raw_flow: Union[Unset, CompletedJobRawFlow] = UNSET + language: Union[Unset, CompletedJobLanguage] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + created_by = self.created_by + created_at = self.created_at.isoformat() + + started_at = self.started_at.isoformat() + + duration_ms = self.duration_ms + success = self.success + canceled = self.canceled + job_kind = self.job_kind.value + + permissioned_as = self.permissioned_as + is_flow_step = self.is_flow_step + is_skipped = self.is_skipped + workspace_id = self.workspace_id + parent_job = self.parent_job + script_path = self.script_path + script_hash = self.script_hash + args: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.args, Unset): + args = self.args.to_dict() + + result: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.result, Unset): + result = self.result.to_dict() + + logs = self.logs + deleted = self.deleted + raw_code = self.raw_code + canceled_by = self.canceled_by + canceled_reason = self.canceled_reason + schedule_path = self.schedule_path + flow_status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.flow_status, Unset): + flow_status = self.flow_status.to_dict() + + raw_flow: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.raw_flow, Unset): + raw_flow = self.raw_flow.to_dict() + + language: Union[Unset, str] = UNSET + if not isinstance(self.language, Unset): + language = self.language.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "created_by": created_by, + "created_at": created_at, + "started_at": started_at, + "duration_ms": duration_ms, + "success": success, + "canceled": canceled, + "job_kind": job_kind, + "permissioned_as": permissioned_as, + "is_flow_step": is_flow_step, + "is_skipped": is_skipped, + } + ) + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if parent_job is not UNSET: + field_dict["parent_job"] = parent_job + if script_path is not UNSET: + field_dict["script_path"] = script_path + if script_hash is not UNSET: + field_dict["script_hash"] = script_hash + if args is not UNSET: + field_dict["args"] = args + if result is not UNSET: + field_dict["result"] = result + if logs is not UNSET: + field_dict["logs"] = logs + if deleted is not UNSET: + field_dict["deleted"] = deleted + if raw_code is not UNSET: + field_dict["raw_code"] = raw_code + if canceled_by is not UNSET: + field_dict["canceled_by"] = canceled_by + if canceled_reason is not UNSET: + field_dict["canceled_reason"] = canceled_reason + if schedule_path is not UNSET: + field_dict["schedule_path"] = schedule_path + if flow_status is not UNSET: + field_dict["flow_status"] = flow_status + if raw_flow is not UNSET: + field_dict["raw_flow"] = raw_flow + if language is not UNSET: + field_dict["language"] = language + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id") + + created_by = d.pop("created_by") + + created_at = isoparse(d.pop("created_at")) + + started_at = isoparse(d.pop("started_at")) + + duration_ms = d.pop("duration_ms") + + success = d.pop("success") + + canceled = d.pop("canceled") + + job_kind = CompletedJobJobKind(d.pop("job_kind")) + + permissioned_as = d.pop("permissioned_as") + + is_flow_step = d.pop("is_flow_step") + + is_skipped = d.pop("is_skipped") + + workspace_id = d.pop("workspace_id", UNSET) + + parent_job = d.pop("parent_job", UNSET) + + script_path = d.pop("script_path", UNSET) + + script_hash = d.pop("script_hash", UNSET) + + _args = d.pop("args", UNSET) + args: Union[Unset, CompletedJobArgs] + if isinstance(_args, Unset): + args = UNSET + else: + args = CompletedJobArgs.from_dict(_args) + + _result = d.pop("result", UNSET) + result: Union[Unset, CompletedJobResult] + if isinstance(_result, Unset): + result = UNSET + else: + result = CompletedJobResult.from_dict(_result) + + logs = d.pop("logs", UNSET) + + deleted = d.pop("deleted", UNSET) + + raw_code = d.pop("raw_code", UNSET) + + canceled_by = d.pop("canceled_by", UNSET) + + canceled_reason = d.pop("canceled_reason", UNSET) + + schedule_path = d.pop("schedule_path", UNSET) + + _flow_status = d.pop("flow_status", UNSET) + flow_status: Union[Unset, CompletedJobFlowStatus] + if isinstance(_flow_status, Unset): + flow_status = UNSET + else: + flow_status = CompletedJobFlowStatus.from_dict(_flow_status) + + _raw_flow = d.pop("raw_flow", UNSET) + raw_flow: Union[Unset, CompletedJobRawFlow] + if isinstance(_raw_flow, Unset): + raw_flow = UNSET + else: + raw_flow = CompletedJobRawFlow.from_dict(_raw_flow) + + _language = d.pop("language", UNSET) + language: Union[Unset, CompletedJobLanguage] + if isinstance(_language, Unset): + language = UNSET + else: + language = CompletedJobLanguage(_language) + + completed_job = cls( + id=id, + created_by=created_by, + created_at=created_at, + started_at=started_at, + duration_ms=duration_ms, + success=success, + canceled=canceled, + job_kind=job_kind, + permissioned_as=permissioned_as, + is_flow_step=is_flow_step, + is_skipped=is_skipped, + workspace_id=workspace_id, + parent_job=parent_job, + script_path=script_path, + script_hash=script_hash, + args=args, + result=result, + logs=logs, + deleted=deleted, + raw_code=raw_code, + canceled_by=canceled_by, + canceled_reason=canceled_reason, + schedule_path=schedule_path, + flow_status=flow_status, + raw_flow=raw_flow, + language=language, + ) + + completed_job.additional_properties = d + return completed_job + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_args.py b/python-client/windmill-api/windmill_api/models/completed_job_args.py new file mode 100644 index 0000000000..0045bda534 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_args.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="CompletedJobArgs") + + +@attr.s(auto_attribs=True) +class CompletedJobArgs: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + completed_job_args = cls() + + completed_job_args.additional_properties = d + return completed_job_args + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_flow_status.py b/python-client/windmill-api/windmill_api/models/completed_job_flow_status.py new file mode 100644 index 0000000000..73d0ccc7bb --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_flow_status.py @@ -0,0 +1,102 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.completed_job_flow_status_failure_module import CompletedJobFlowStatusFailureModule +from ..models.completed_job_flow_status_modules_item import CompletedJobFlowStatusModulesItem +from ..models.completed_job_flow_status_retry import CompletedJobFlowStatusRetry +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobFlowStatus") + + +@attr.s(auto_attribs=True) +class CompletedJobFlowStatus: + """ + Attributes: + step (int): + modules (List[CompletedJobFlowStatusModulesItem]): + failure_module (CompletedJobFlowStatusFailureModule): + retry (Union[Unset, CompletedJobFlowStatusRetry]): + """ + + step: int + modules: List[CompletedJobFlowStatusModulesItem] + failure_module: CompletedJobFlowStatusFailureModule + retry: Union[Unset, CompletedJobFlowStatusRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + step = self.step + modules = [] + for modules_item_data in self.modules: + modules_item = modules_item_data.to_dict() + + modules.append(modules_item) + + failure_module = self.failure_module.to_dict() + + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "step": step, + "modules": modules, + "failure_module": failure_module, + } + ) + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + step = d.pop("step") + + modules = [] + _modules = d.pop("modules") + for modules_item_data in _modules: + modules_item = CompletedJobFlowStatusModulesItem.from_dict(modules_item_data) + + modules.append(modules_item) + + failure_module = CompletedJobFlowStatusFailureModule.from_dict(d.pop("failure_module")) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, CompletedJobFlowStatusRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = CompletedJobFlowStatusRetry.from_dict(_retry) + + completed_job_flow_status = cls( + step=step, + modules=modules, + failure_module=failure_module, + retry=retry, + ) + + completed_job_flow_status.additional_properties = d + return completed_job_flow_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_flow_status_failure_module.py b/python-client/windmill-api/windmill_api/models/completed_job_flow_status_failure_module.py new file mode 100644 index 0000000000..bcc4a0be4c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_flow_status_failure_module.py @@ -0,0 +1,104 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.completed_job_flow_status_failure_module_iterator import CompletedJobFlowStatusFailureModuleIterator +from ..models.completed_job_flow_status_failure_module_type import CompletedJobFlowStatusFailureModuleType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobFlowStatusFailureModule") + + +@attr.s(auto_attribs=True) +class CompletedJobFlowStatusFailureModule: + """ + Attributes: + type (CompletedJobFlowStatusFailureModuleType): + job (Union[Unset, str]): + count (Union[Unset, int]): + iterator (Union[Unset, CompletedJobFlowStatusFailureModuleIterator]): + forloop_jobs (Union[Unset, List[str]]): + """ + + type: CompletedJobFlowStatusFailureModuleType + job: Union[Unset, str] = UNSET + count: Union[Unset, int] = UNSET + iterator: Union[Unset, CompletedJobFlowStatusFailureModuleIterator] = UNSET + forloop_jobs: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + job = self.job + count = self.count + iterator: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.iterator, Unset): + iterator = self.iterator.to_dict() + + forloop_jobs: Union[Unset, List[str]] = UNSET + if not isinstance(self.forloop_jobs, Unset): + forloop_jobs = self.forloop_jobs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if job is not UNSET: + field_dict["job"] = job + if count is not UNSET: + field_dict["count"] = count + if iterator is not UNSET: + field_dict["iterator"] = iterator + if forloop_jobs is not UNSET: + field_dict["forloop_jobs"] = forloop_jobs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = CompletedJobFlowStatusFailureModuleType(d.pop("type")) + + job = d.pop("job", UNSET) + + count = d.pop("count", UNSET) + + _iterator = d.pop("iterator", UNSET) + iterator: Union[Unset, CompletedJobFlowStatusFailureModuleIterator] + if isinstance(_iterator, Unset): + iterator = UNSET + else: + iterator = CompletedJobFlowStatusFailureModuleIterator.from_dict(_iterator) + + forloop_jobs = cast(List[str], d.pop("forloop_jobs", UNSET)) + + completed_job_flow_status_failure_module = cls( + type=type, + job=job, + count=count, + iterator=iterator, + forloop_jobs=forloop_jobs, + ) + + completed_job_flow_status_failure_module.additional_properties = d + return completed_job_flow_status_failure_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_flow_status_failure_module_iterator.py b/python-client/windmill-api/windmill_api/models/completed_job_flow_status_failure_module_iterator.py new file mode 100644 index 0000000000..7e2eb00de5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_flow_status_failure_module_iterator.py @@ -0,0 +1,76 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobFlowStatusFailureModuleIterator") + + +@attr.s(auto_attribs=True) +class CompletedJobFlowStatusFailureModuleIterator: + """ + Attributes: + index (Union[Unset, int]): + itered (Union[Unset, List[Any]]): + args (Union[Unset, Any]): + """ + + index: Union[Unset, int] = UNSET + itered: Union[Unset, List[Any]] = UNSET + args: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + index = self.index + itered: Union[Unset, List[Any]] = UNSET + if not isinstance(self.itered, Unset): + itered = self.itered + + args = self.args + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if index is not UNSET: + field_dict["index"] = index + if itered is not UNSET: + field_dict["itered"] = itered + if args is not UNSET: + field_dict["args"] = args + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + index = d.pop("index", UNSET) + + itered = cast(List[Any], d.pop("itered", UNSET)) + + args = d.pop("args", UNSET) + + completed_job_flow_status_failure_module_iterator = cls( + index=index, + itered=itered, + args=args, + ) + + completed_job_flow_status_failure_module_iterator.additional_properties = d + return completed_job_flow_status_failure_module_iterator + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_flow_status_failure_module_type.py b/python-client/windmill-api/windmill_api/models/completed_job_flow_status_failure_module_type.py new file mode 100644 index 0000000000..d474cca7ce --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_flow_status_failure_module_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class CompletedJobFlowStatusFailureModuleType(str, Enum): + WAITINGFORPRIORSTEPS = "WaitingForPriorSteps" + WAITINGFOREVENT = "WaitingForEvent" + WAITINGFOREXECUTOR = "WaitingForExecutor" + INPROGRESS = "InProgress" + SUCCESS = "Success" + FAILURE = "Failure" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_flow_status_modules_item.py b/python-client/windmill-api/windmill_api/models/completed_job_flow_status_modules_item.py new file mode 100644 index 0000000000..6dc177b16b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_flow_status_modules_item.py @@ -0,0 +1,104 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.completed_job_flow_status_modules_item_iterator import CompletedJobFlowStatusModulesItemIterator +from ..models.completed_job_flow_status_modules_item_type import CompletedJobFlowStatusModulesItemType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobFlowStatusModulesItem") + + +@attr.s(auto_attribs=True) +class CompletedJobFlowStatusModulesItem: + """ + Attributes: + type (CompletedJobFlowStatusModulesItemType): + job (Union[Unset, str]): + count (Union[Unset, int]): + iterator (Union[Unset, CompletedJobFlowStatusModulesItemIterator]): + forloop_jobs (Union[Unset, List[str]]): + """ + + type: CompletedJobFlowStatusModulesItemType + job: Union[Unset, str] = UNSET + count: Union[Unset, int] = UNSET + iterator: Union[Unset, CompletedJobFlowStatusModulesItemIterator] = UNSET + forloop_jobs: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + job = self.job + count = self.count + iterator: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.iterator, Unset): + iterator = self.iterator.to_dict() + + forloop_jobs: Union[Unset, List[str]] = UNSET + if not isinstance(self.forloop_jobs, Unset): + forloop_jobs = self.forloop_jobs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if job is not UNSET: + field_dict["job"] = job + if count is not UNSET: + field_dict["count"] = count + if iterator is not UNSET: + field_dict["iterator"] = iterator + if forloop_jobs is not UNSET: + field_dict["forloop_jobs"] = forloop_jobs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = CompletedJobFlowStatusModulesItemType(d.pop("type")) + + job = d.pop("job", UNSET) + + count = d.pop("count", UNSET) + + _iterator = d.pop("iterator", UNSET) + iterator: Union[Unset, CompletedJobFlowStatusModulesItemIterator] + if isinstance(_iterator, Unset): + iterator = UNSET + else: + iterator = CompletedJobFlowStatusModulesItemIterator.from_dict(_iterator) + + forloop_jobs = cast(List[str], d.pop("forloop_jobs", UNSET)) + + completed_job_flow_status_modules_item = cls( + type=type, + job=job, + count=count, + iterator=iterator, + forloop_jobs=forloop_jobs, + ) + + completed_job_flow_status_modules_item.additional_properties = d + return completed_job_flow_status_modules_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_flow_status_modules_item_iterator.py b/python-client/windmill-api/windmill_api/models/completed_job_flow_status_modules_item_iterator.py new file mode 100644 index 0000000000..be116bd952 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_flow_status_modules_item_iterator.py @@ -0,0 +1,76 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobFlowStatusModulesItemIterator") + + +@attr.s(auto_attribs=True) +class CompletedJobFlowStatusModulesItemIterator: + """ + Attributes: + index (Union[Unset, int]): + itered (Union[Unset, List[Any]]): + args (Union[Unset, Any]): + """ + + index: Union[Unset, int] = UNSET + itered: Union[Unset, List[Any]] = UNSET + args: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + index = self.index + itered: Union[Unset, List[Any]] = UNSET + if not isinstance(self.itered, Unset): + itered = self.itered + + args = self.args + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if index is not UNSET: + field_dict["index"] = index + if itered is not UNSET: + field_dict["itered"] = itered + if args is not UNSET: + field_dict["args"] = args + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + index = d.pop("index", UNSET) + + itered = cast(List[Any], d.pop("itered", UNSET)) + + args = d.pop("args", UNSET) + + completed_job_flow_status_modules_item_iterator = cls( + index=index, + itered=itered, + args=args, + ) + + completed_job_flow_status_modules_item_iterator.additional_properties = d + return completed_job_flow_status_modules_item_iterator + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_flow_status_modules_item_type.py b/python-client/windmill-api/windmill_api/models/completed_job_flow_status_modules_item_type.py new file mode 100644 index 0000000000..59b768923e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_flow_status_modules_item_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class CompletedJobFlowStatusModulesItemType(str, Enum): + WAITINGFORPRIORSTEPS = "WaitingForPriorSteps" + WAITINGFOREVENT = "WaitingForEvent" + WAITINGFOREXECUTOR = "WaitingForExecutor" + INPROGRESS = "InProgress" + SUCCESS = "Success" + FAILURE = "Failure" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_flow_status_retry.py b/python-client/windmill-api/windmill_api/models/completed_job_flow_status_retry.py new file mode 100644 index 0000000000..b6a03aee58 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_flow_status_retry.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobFlowStatusRetry") + + +@attr.s(auto_attribs=True) +class CompletedJobFlowStatusRetry: + """ + Attributes: + fail_count (Union[Unset, int]): + """ + + fail_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + fail_count = self.fail_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if fail_count is not UNSET: + field_dict["fail_count"] = fail_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + fail_count = d.pop("fail_count", UNSET) + + completed_job_flow_status_retry = cls( + fail_count=fail_count, + ) + + completed_job_flow_status_retry.additional_properties = d + return completed_job_flow_status_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_job_kind.py b/python-client/windmill-api/windmill_api/models/completed_job_job_kind.py new file mode 100644 index 0000000000..37642f8be4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_job_kind.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class CompletedJobJobKind(str, Enum): + SCRIPT = "script" + PREVIEW = "preview" + DEPENDENCIES = "dependencies" + FLOW = "flow" + FLOWPREVIEW = "flowpreview" + SCRIPT_HUB = "script_hub" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_language.py b/python-client/windmill-api/windmill_api/models/completed_job_language.py new file mode 100644 index 0000000000..06bc1486c1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class CompletedJobLanguage(str, Enum): + PYTHON3 = "python3" + DENO = "deno" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow.py new file mode 100644 index 0000000000..943f2e6349 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow.py @@ -0,0 +1,95 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.completed_job_raw_flow_failure_module import CompletedJobRawFlowFailureModule +from ..models.completed_job_raw_flow_modules_item import CompletedJobRawFlowModulesItem +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobRawFlow") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlow: + """ + Attributes: + modules (List[CompletedJobRawFlowModulesItem]): + failure_module (Union[Unset, CompletedJobRawFlowFailureModule]): + same_worker (Union[Unset, bool]): + """ + + modules: List[CompletedJobRawFlowModulesItem] + failure_module: Union[Unset, CompletedJobRawFlowFailureModule] = UNSET + same_worker: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + modules = [] + for modules_item_data in self.modules: + modules_item = modules_item_data.to_dict() + + modules.append(modules_item) + + failure_module: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.failure_module, Unset): + failure_module = self.failure_module.to_dict() + + same_worker = self.same_worker + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "modules": modules, + } + ) + if failure_module is not UNSET: + field_dict["failure_module"] = failure_module + if same_worker is not UNSET: + field_dict["same_worker"] = same_worker + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + modules = [] + _modules = d.pop("modules") + for modules_item_data in _modules: + modules_item = CompletedJobRawFlowModulesItem.from_dict(modules_item_data) + + modules.append(modules_item) + + _failure_module = d.pop("failure_module", UNSET) + failure_module: Union[Unset, CompletedJobRawFlowFailureModule] + if isinstance(_failure_module, Unset): + failure_module = UNSET + else: + failure_module = CompletedJobRawFlowFailureModule.from_dict(_failure_module) + + same_worker = d.pop("same_worker", UNSET) + + completed_job_raw_flow = cls( + modules=modules, + failure_module=failure_module, + same_worker=same_worker, + ) + + completed_job_raw_flow.additional_properties = d + return completed_job_raw_flow + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module.py new file mode 100644 index 0000000000..58b1009d6e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module.py @@ -0,0 +1,230 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.completed_job_raw_flow_failure_module_input_transforms import ( + CompletedJobRawFlowFailureModuleInputTransforms, +) +from ..models.completed_job_raw_flow_failure_module_retry import CompletedJobRawFlowFailureModuleRetry +from ..models.completed_job_raw_flow_failure_module_sleep_type_0 import CompletedJobRawFlowFailureModuleSleepType0 +from ..models.completed_job_raw_flow_failure_module_sleep_type_1 import CompletedJobRawFlowFailureModuleSleepType1 +from ..models.completed_job_raw_flow_failure_module_stop_after_if import CompletedJobRawFlowFailureModuleStopAfterIf +from ..models.completed_job_raw_flow_failure_module_value_type_0 import CompletedJobRawFlowFailureModuleValueType0 +from ..models.completed_job_raw_flow_failure_module_value_type_1 import CompletedJobRawFlowFailureModuleValueType1 +from ..models.completed_job_raw_flow_failure_module_value_type_2 import CompletedJobRawFlowFailureModuleValueType2 +from ..models.completed_job_raw_flow_failure_module_value_type_3 import CompletedJobRawFlowFailureModuleValueType3 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobRawFlowFailureModule") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowFailureModule: + """ + Attributes: + input_transforms (CompletedJobRawFlowFailureModuleInputTransforms): + value (Union[CompletedJobRawFlowFailureModuleValueType0, CompletedJobRawFlowFailureModuleValueType1, + CompletedJobRawFlowFailureModuleValueType2, CompletedJobRawFlowFailureModuleValueType3]): + stop_after_if (Union[Unset, CompletedJobRawFlowFailureModuleStopAfterIf]): + sleep (Union[CompletedJobRawFlowFailureModuleSleepType0, CompletedJobRawFlowFailureModuleSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, CompletedJobRawFlowFailureModuleRetry]): + """ + + input_transforms: CompletedJobRawFlowFailureModuleInputTransforms + value: Union[ + CompletedJobRawFlowFailureModuleValueType0, + CompletedJobRawFlowFailureModuleValueType1, + CompletedJobRawFlowFailureModuleValueType2, + CompletedJobRawFlowFailureModuleValueType3, + ] + stop_after_if: Union[Unset, CompletedJobRawFlowFailureModuleStopAfterIf] = UNSET + sleep: Union[CompletedJobRawFlowFailureModuleSleepType0, CompletedJobRawFlowFailureModuleSleepType1, Unset] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, CompletedJobRawFlowFailureModuleRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, CompletedJobRawFlowFailureModuleValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, CompletedJobRawFlowFailureModuleValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, CompletedJobRawFlowFailureModuleValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, CompletedJobRawFlowFailureModuleSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = CompletedJobRawFlowFailureModuleInputTransforms.from_dict(d.pop("input_transforms")) + + def _parse_value( + data: object, + ) -> Union[ + CompletedJobRawFlowFailureModuleValueType0, + CompletedJobRawFlowFailureModuleValueType1, + CompletedJobRawFlowFailureModuleValueType2, + CompletedJobRawFlowFailureModuleValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = CompletedJobRawFlowFailureModuleValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = CompletedJobRawFlowFailureModuleValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = CompletedJobRawFlowFailureModuleValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = CompletedJobRawFlowFailureModuleValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, CompletedJobRawFlowFailureModuleStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = CompletedJobRawFlowFailureModuleStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[CompletedJobRawFlowFailureModuleSleepType0, CompletedJobRawFlowFailureModuleSleepType1, Unset]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, CompletedJobRawFlowFailureModuleSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = CompletedJobRawFlowFailureModuleSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, CompletedJobRawFlowFailureModuleSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = CompletedJobRawFlowFailureModuleSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, CompletedJobRawFlowFailureModuleRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = CompletedJobRawFlowFailureModuleRetry.from_dict(_retry) + + completed_job_raw_flow_failure_module = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + completed_job_raw_flow_failure_module.additional_properties = d + return completed_job_raw_flow_failure_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_input_transforms.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_input_transforms.py new file mode 100644 index 0000000000..7c27509449 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_input_transforms.py @@ -0,0 +1,107 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.completed_job_raw_flow_failure_module_input_transforms_additional_property_type_0 import ( + CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0, +) +from ..models.completed_job_raw_flow_failure_module_input_transforms_additional_property_type_1 import ( + CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleInputTransforms") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowFailureModuleInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0, + CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + completed_job_raw_flow_failure_module_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0, + CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0.from_dict(data) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1.from_dict(data) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + completed_job_raw_flow_failure_module_input_transforms.additional_properties = additional_properties + return completed_job_raw_flow_failure_module_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0, + CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0, + CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..e2105b7c41 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_input_transforms_additional_property_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.completed_job_raw_flow_failure_module_input_transforms_additional_property_type_0_type import ( + CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + completed_job_raw_flow_failure_module_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + completed_job_raw_flow_failure_module_input_transforms_additional_property_type_0.additional_properties = d + return completed_job_raw_flow_failure_module_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..7c6aae1d47 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..0cfc7526e8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_input_transforms_additional_property_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.completed_job_raw_flow_failure_module_input_transforms_additional_property_type_1_type import ( + CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + completed_job_raw_flow_failure_module_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + completed_job_raw_flow_failure_module_input_transforms_additional_property_type_1.additional_properties = d + return completed_job_raw_flow_failure_module_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..128e276099 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_retry.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_retry.py new file mode 100644 index 0000000000..93eef43597 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_retry.py @@ -0,0 +1,84 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.completed_job_raw_flow_failure_module_retry_constant import CompletedJobRawFlowFailureModuleRetryConstant +from ..models.completed_job_raw_flow_failure_module_retry_exponential import ( + CompletedJobRawFlowFailureModuleRetryExponential, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleRetry") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowFailureModuleRetry: + """ + Attributes: + constant (Union[Unset, CompletedJobRawFlowFailureModuleRetryConstant]): + exponential (Union[Unset, CompletedJobRawFlowFailureModuleRetryExponential]): + """ + + constant: Union[Unset, CompletedJobRawFlowFailureModuleRetryConstant] = UNSET + exponential: Union[Unset, CompletedJobRawFlowFailureModuleRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, CompletedJobRawFlowFailureModuleRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = CompletedJobRawFlowFailureModuleRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, CompletedJobRawFlowFailureModuleRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = CompletedJobRawFlowFailureModuleRetryExponential.from_dict(_exponential) + + completed_job_raw_flow_failure_module_retry = cls( + constant=constant, + exponential=exponential, + ) + + completed_job_raw_flow_failure_module_retry.additional_properties = d + return completed_job_raw_flow_failure_module_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_retry_constant.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_retry_constant.py new file mode 100644 index 0000000000..311e088750 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleRetryConstant") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowFailureModuleRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + completed_job_raw_flow_failure_module_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + completed_job_raw_flow_failure_module_retry_constant.additional_properties = d + return completed_job_raw_flow_failure_module_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_retry_exponential.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_retry_exponential.py new file mode 100644 index 0000000000..7ef2b224a2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleRetryExponential") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowFailureModuleRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + completed_job_raw_flow_failure_module_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + completed_job_raw_flow_failure_module_retry_exponential.additional_properties = d + return completed_job_raw_flow_failure_module_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_sleep_type_0.py new file mode 100644 index 0000000000..5bed42a3a7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_sleep_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.completed_job_raw_flow_failure_module_sleep_type_0_type import ( + CompletedJobRawFlowFailureModuleSleepType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleSleepType0") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowFailureModuleSleepType0: + """ + Attributes: + type (CompletedJobRawFlowFailureModuleSleepType0Type): + value (Union[Unset, Any]): + """ + + type: CompletedJobRawFlowFailureModuleSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = CompletedJobRawFlowFailureModuleSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + completed_job_raw_flow_failure_module_sleep_type_0 = cls( + type=type, + value=value, + ) + + completed_job_raw_flow_failure_module_sleep_type_0.additional_properties = d + return completed_job_raw_flow_failure_module_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_sleep_type_0_type.py new file mode 100644 index 0000000000..9ea4f9d16d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CompletedJobRawFlowFailureModuleSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_sleep_type_1.py new file mode 100644 index 0000000000..f092410202 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_sleep_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.completed_job_raw_flow_failure_module_sleep_type_1_type import ( + CompletedJobRawFlowFailureModuleSleepType1Type, +) + +T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleSleepType1") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowFailureModuleSleepType1: + """ + Attributes: + expr (str): + type (CompletedJobRawFlowFailureModuleSleepType1Type): + """ + + expr: str + type: CompletedJobRawFlowFailureModuleSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = CompletedJobRawFlowFailureModuleSleepType1Type(d.pop("type")) + + completed_job_raw_flow_failure_module_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + completed_job_raw_flow_failure_module_sleep_type_1.additional_properties = d + return completed_job_raw_flow_failure_module_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_sleep_type_1_type.py new file mode 100644 index 0000000000..a23e57588a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CompletedJobRawFlowFailureModuleSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_stop_after_if.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_stop_after_if.py new file mode 100644 index 0000000000..e041024b44 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleStopAfterIf") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowFailureModuleStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + completed_job_raw_flow_failure_module_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + completed_job_raw_flow_failure_module_stop_after_if.additional_properties = d + return completed_job_raw_flow_failure_module_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_0.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_0.py new file mode 100644 index 0000000000..7764c83716 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.completed_job_raw_flow_failure_module_value_type_0_language import ( + CompletedJobRawFlowFailureModuleValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleValueType0") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowFailureModuleValueType0: + """ + Attributes: + content (str): + language (CompletedJobRawFlowFailureModuleValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: CompletedJobRawFlowFailureModuleValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = CompletedJobRawFlowFailureModuleValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + completed_job_raw_flow_failure_module_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + completed_job_raw_flow_failure_module_value_type_0.additional_properties = d + return completed_job_raw_flow_failure_module_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_0_language.py new file mode 100644 index 0000000000..38de415aa5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class CompletedJobRawFlowFailureModuleValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_1.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_1.py new file mode 100644 index 0000000000..48ca3eba87 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.completed_job_raw_flow_failure_module_value_type_1_type import ( + CompletedJobRawFlowFailureModuleValueType1Type, +) + +T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleValueType1") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowFailureModuleValueType1: + """ + Attributes: + path (str): + type (CompletedJobRawFlowFailureModuleValueType1Type): + """ + + path: str + type: CompletedJobRawFlowFailureModuleValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = CompletedJobRawFlowFailureModuleValueType1Type(d.pop("type")) + + completed_job_raw_flow_failure_module_value_type_1 = cls( + path=path, + type=type, + ) + + completed_job_raw_flow_failure_module_value_type_1.additional_properties = d + return completed_job_raw_flow_failure_module_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_1_type.py new file mode 100644 index 0000000000..492c211df5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CompletedJobRawFlowFailureModuleValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2.py new file mode 100644 index 0000000000..0d6eed21db --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2.py @@ -0,0 +1,111 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.completed_job_raw_flow_failure_module_value_type_2_iterator_type_0 import ( + CompletedJobRawFlowFailureModuleValueType2IteratorType0, +) +from ..models.completed_job_raw_flow_failure_module_value_type_2_iterator_type_1 import ( + CompletedJobRawFlowFailureModuleValueType2IteratorType1, +) +from ..models.completed_job_raw_flow_failure_module_value_type_2_type import ( + CompletedJobRawFlowFailureModuleValueType2Type, +) + +T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleValueType2") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowFailureModuleValueType2: + """ + Attributes: + iterator (Union[CompletedJobRawFlowFailureModuleValueType2IteratorType0, + CompletedJobRawFlowFailureModuleValueType2IteratorType1]): + skip_failures (bool): + type (CompletedJobRawFlowFailureModuleValueType2Type): + """ + + iterator: Union[ + CompletedJobRawFlowFailureModuleValueType2IteratorType0, CompletedJobRawFlowFailureModuleValueType2IteratorType1 + ] + skip_failures: bool + type: CompletedJobRawFlowFailureModuleValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, CompletedJobRawFlowFailureModuleValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + CompletedJobRawFlowFailureModuleValueType2IteratorType0, + CompletedJobRawFlowFailureModuleValueType2IteratorType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = CompletedJobRawFlowFailureModuleValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = CompletedJobRawFlowFailureModuleValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = CompletedJobRawFlowFailureModuleValueType2Type(d.pop("type")) + + completed_job_raw_flow_failure_module_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + completed_job_raw_flow_failure_module_value_type_2.additional_properties = d + return completed_job_raw_flow_failure_module_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..a277b880c6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.completed_job_raw_flow_failure_module_value_type_2_iterator_type_0_type import ( + CompletedJobRawFlowFailureModuleValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowFailureModuleValueType2IteratorType0: + """ + Attributes: + type (CompletedJobRawFlowFailureModuleValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: CompletedJobRawFlowFailureModuleValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = CompletedJobRawFlowFailureModuleValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + completed_job_raw_flow_failure_module_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + completed_job_raw_flow_failure_module_value_type_2_iterator_type_0.additional_properties = d + return completed_job_raw_flow_failure_module_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..4b09698b83 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CompletedJobRawFlowFailureModuleValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..53252a4021 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.completed_job_raw_flow_failure_module_value_type_2_iterator_type_1_type import ( + CompletedJobRawFlowFailureModuleValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowFailureModuleValueType2IteratorType1: + """ + Attributes: + expr (str): + type (CompletedJobRawFlowFailureModuleValueType2IteratorType1Type): + """ + + expr: str + type: CompletedJobRawFlowFailureModuleValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = CompletedJobRawFlowFailureModuleValueType2IteratorType1Type(d.pop("type")) + + completed_job_raw_flow_failure_module_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + completed_job_raw_flow_failure_module_value_type_2_iterator_type_1.additional_properties = d + return completed_job_raw_flow_failure_module_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..bd875b1210 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CompletedJobRawFlowFailureModuleValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2_type.py new file mode 100644 index 0000000000..8d56743aa8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CompletedJobRawFlowFailureModuleValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_3.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_3.py new file mode 100644 index 0000000000..6d4807c372 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_3.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.completed_job_raw_flow_failure_module_value_type_3_type import ( + CompletedJobRawFlowFailureModuleValueType3Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleValueType3") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowFailureModuleValueType3: + """ + Attributes: + type (CompletedJobRawFlowFailureModuleValueType3Type): + path (Union[Unset, str]): + """ + + type: CompletedJobRawFlowFailureModuleValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = CompletedJobRawFlowFailureModuleValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + completed_job_raw_flow_failure_module_value_type_3 = cls( + type=type, + path=path, + ) + + completed_job_raw_flow_failure_module_value_type_3.additional_properties = d + return completed_job_raw_flow_failure_module_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_3_type.py new file mode 100644 index 0000000000..9ca29534a0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_failure_module_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CompletedJobRawFlowFailureModuleValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item.py new file mode 100644 index 0000000000..7c13ffa789 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item.py @@ -0,0 +1,228 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.completed_job_raw_flow_modules_item_input_transforms import CompletedJobRawFlowModulesItemInputTransforms +from ..models.completed_job_raw_flow_modules_item_retry import CompletedJobRawFlowModulesItemRetry +from ..models.completed_job_raw_flow_modules_item_sleep_type_0 import CompletedJobRawFlowModulesItemSleepType0 +from ..models.completed_job_raw_flow_modules_item_sleep_type_1 import CompletedJobRawFlowModulesItemSleepType1 +from ..models.completed_job_raw_flow_modules_item_stop_after_if import CompletedJobRawFlowModulesItemStopAfterIf +from ..models.completed_job_raw_flow_modules_item_value_type_0 import CompletedJobRawFlowModulesItemValueType0 +from ..models.completed_job_raw_flow_modules_item_value_type_1 import CompletedJobRawFlowModulesItemValueType1 +from ..models.completed_job_raw_flow_modules_item_value_type_2 import CompletedJobRawFlowModulesItemValueType2 +from ..models.completed_job_raw_flow_modules_item_value_type_3 import CompletedJobRawFlowModulesItemValueType3 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobRawFlowModulesItem") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowModulesItem: + """ + Attributes: + input_transforms (CompletedJobRawFlowModulesItemInputTransforms): + value (Union[CompletedJobRawFlowModulesItemValueType0, CompletedJobRawFlowModulesItemValueType1, + CompletedJobRawFlowModulesItemValueType2, CompletedJobRawFlowModulesItemValueType3]): + stop_after_if (Union[Unset, CompletedJobRawFlowModulesItemStopAfterIf]): + sleep (Union[CompletedJobRawFlowModulesItemSleepType0, CompletedJobRawFlowModulesItemSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, CompletedJobRawFlowModulesItemRetry]): + """ + + input_transforms: CompletedJobRawFlowModulesItemInputTransforms + value: Union[ + CompletedJobRawFlowModulesItemValueType0, + CompletedJobRawFlowModulesItemValueType1, + CompletedJobRawFlowModulesItemValueType2, + CompletedJobRawFlowModulesItemValueType3, + ] + stop_after_if: Union[Unset, CompletedJobRawFlowModulesItemStopAfterIf] = UNSET + sleep: Union[CompletedJobRawFlowModulesItemSleepType0, CompletedJobRawFlowModulesItemSleepType1, Unset] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, CompletedJobRawFlowModulesItemRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, CompletedJobRawFlowModulesItemValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, CompletedJobRawFlowModulesItemValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, CompletedJobRawFlowModulesItemValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, CompletedJobRawFlowModulesItemSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = CompletedJobRawFlowModulesItemInputTransforms.from_dict(d.pop("input_transforms")) + + def _parse_value( + data: object, + ) -> Union[ + CompletedJobRawFlowModulesItemValueType0, + CompletedJobRawFlowModulesItemValueType1, + CompletedJobRawFlowModulesItemValueType2, + CompletedJobRawFlowModulesItemValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = CompletedJobRawFlowModulesItemValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = CompletedJobRawFlowModulesItemValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = CompletedJobRawFlowModulesItemValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = CompletedJobRawFlowModulesItemValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, CompletedJobRawFlowModulesItemStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = CompletedJobRawFlowModulesItemStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[CompletedJobRawFlowModulesItemSleepType0, CompletedJobRawFlowModulesItemSleepType1, Unset]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, CompletedJobRawFlowModulesItemSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = CompletedJobRawFlowModulesItemSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, CompletedJobRawFlowModulesItemSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = CompletedJobRawFlowModulesItemSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, CompletedJobRawFlowModulesItemRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = CompletedJobRawFlowModulesItemRetry.from_dict(_retry) + + completed_job_raw_flow_modules_item = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + completed_job_raw_flow_modules_item.additional_properties = d + return completed_job_raw_flow_modules_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_input_transforms.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_input_transforms.py new file mode 100644 index 0000000000..c61b9b6edb --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_input_transforms.py @@ -0,0 +1,107 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.completed_job_raw_flow_modules_item_input_transforms_additional_property_type_0 import ( + CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0, +) +from ..models.completed_job_raw_flow_modules_item_input_transforms_additional_property_type_1 import ( + CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="CompletedJobRawFlowModulesItemInputTransforms") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowModulesItemInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0, + CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + completed_job_raw_flow_modules_item_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0, + CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0.from_dict(data) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1.from_dict(data) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + completed_job_raw_flow_modules_item_input_transforms.additional_properties = additional_properties + return completed_job_raw_flow_modules_item_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0, + CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0, + CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..7eb5701968 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_input_transforms_additional_property_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.completed_job_raw_flow_modules_item_input_transforms_additional_property_type_0_type import ( + CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + completed_job_raw_flow_modules_item_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + completed_job_raw_flow_modules_item_input_transforms_additional_property_type_0.additional_properties = d + return completed_job_raw_flow_modules_item_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..9e9b82c002 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..baea4f5e73 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_input_transforms_additional_property_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.completed_job_raw_flow_modules_item_input_transforms_additional_property_type_1_type import ( + CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + completed_job_raw_flow_modules_item_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + completed_job_raw_flow_modules_item_input_transforms_additional_property_type_1.additional_properties = d + return completed_job_raw_flow_modules_item_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..4537831d5e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_retry.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_retry.py new file mode 100644 index 0000000000..0b97aff384 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_retry.py @@ -0,0 +1,84 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.completed_job_raw_flow_modules_item_retry_constant import CompletedJobRawFlowModulesItemRetryConstant +from ..models.completed_job_raw_flow_modules_item_retry_exponential import ( + CompletedJobRawFlowModulesItemRetryExponential, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobRawFlowModulesItemRetry") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowModulesItemRetry: + """ + Attributes: + constant (Union[Unset, CompletedJobRawFlowModulesItemRetryConstant]): + exponential (Union[Unset, CompletedJobRawFlowModulesItemRetryExponential]): + """ + + constant: Union[Unset, CompletedJobRawFlowModulesItemRetryConstant] = UNSET + exponential: Union[Unset, CompletedJobRawFlowModulesItemRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, CompletedJobRawFlowModulesItemRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = CompletedJobRawFlowModulesItemRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, CompletedJobRawFlowModulesItemRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = CompletedJobRawFlowModulesItemRetryExponential.from_dict(_exponential) + + completed_job_raw_flow_modules_item_retry = cls( + constant=constant, + exponential=exponential, + ) + + completed_job_raw_flow_modules_item_retry.additional_properties = d + return completed_job_raw_flow_modules_item_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_retry_constant.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_retry_constant.py new file mode 100644 index 0000000000..81f3b618f3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobRawFlowModulesItemRetryConstant") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowModulesItemRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + completed_job_raw_flow_modules_item_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + completed_job_raw_flow_modules_item_retry_constant.additional_properties = d + return completed_job_raw_flow_modules_item_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_retry_exponential.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_retry_exponential.py new file mode 100644 index 0000000000..b46fd899fd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobRawFlowModulesItemRetryExponential") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowModulesItemRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + completed_job_raw_flow_modules_item_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + completed_job_raw_flow_modules_item_retry_exponential.additional_properties = d + return completed_job_raw_flow_modules_item_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_sleep_type_0.py new file mode 100644 index 0000000000..324c56f5c5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_sleep_type_0.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.completed_job_raw_flow_modules_item_sleep_type_0_type import CompletedJobRawFlowModulesItemSleepType0Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobRawFlowModulesItemSleepType0") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowModulesItemSleepType0: + """ + Attributes: + type (CompletedJobRawFlowModulesItemSleepType0Type): + value (Union[Unset, Any]): + """ + + type: CompletedJobRawFlowModulesItemSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = CompletedJobRawFlowModulesItemSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + completed_job_raw_flow_modules_item_sleep_type_0 = cls( + type=type, + value=value, + ) + + completed_job_raw_flow_modules_item_sleep_type_0.additional_properties = d + return completed_job_raw_flow_modules_item_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_sleep_type_0_type.py new file mode 100644 index 0000000000..c7450145e8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CompletedJobRawFlowModulesItemSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_sleep_type_1.py new file mode 100644 index 0000000000..6d0fa54bb4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_sleep_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.completed_job_raw_flow_modules_item_sleep_type_1_type import CompletedJobRawFlowModulesItemSleepType1Type + +T = TypeVar("T", bound="CompletedJobRawFlowModulesItemSleepType1") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowModulesItemSleepType1: + """ + Attributes: + expr (str): + type (CompletedJobRawFlowModulesItemSleepType1Type): + """ + + expr: str + type: CompletedJobRawFlowModulesItemSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = CompletedJobRawFlowModulesItemSleepType1Type(d.pop("type")) + + completed_job_raw_flow_modules_item_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + completed_job_raw_flow_modules_item_sleep_type_1.additional_properties = d + return completed_job_raw_flow_modules_item_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_sleep_type_1_type.py new file mode 100644 index 0000000000..85527c6623 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CompletedJobRawFlowModulesItemSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_stop_after_if.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_stop_after_if.py new file mode 100644 index 0000000000..63bb8640cc --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobRawFlowModulesItemStopAfterIf") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowModulesItemStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + completed_job_raw_flow_modules_item_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + completed_job_raw_flow_modules_item_stop_after_if.additional_properties = d + return completed_job_raw_flow_modules_item_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_0.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_0.py new file mode 100644 index 0000000000..5727b6893f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.completed_job_raw_flow_modules_item_value_type_0_language import ( + CompletedJobRawFlowModulesItemValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobRawFlowModulesItemValueType0") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowModulesItemValueType0: + """ + Attributes: + content (str): + language (CompletedJobRawFlowModulesItemValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: CompletedJobRawFlowModulesItemValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = CompletedJobRawFlowModulesItemValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + completed_job_raw_flow_modules_item_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + completed_job_raw_flow_modules_item_value_type_0.additional_properties = d + return completed_job_raw_flow_modules_item_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_0_language.py new file mode 100644 index 0000000000..ed4a038f0d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class CompletedJobRawFlowModulesItemValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_1.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_1.py new file mode 100644 index 0000000000..681d2e8605 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.completed_job_raw_flow_modules_item_value_type_1_type import CompletedJobRawFlowModulesItemValueType1Type + +T = TypeVar("T", bound="CompletedJobRawFlowModulesItemValueType1") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowModulesItemValueType1: + """ + Attributes: + path (str): + type (CompletedJobRawFlowModulesItemValueType1Type): + """ + + path: str + type: CompletedJobRawFlowModulesItemValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = CompletedJobRawFlowModulesItemValueType1Type(d.pop("type")) + + completed_job_raw_flow_modules_item_value_type_1 = cls( + path=path, + type=type, + ) + + completed_job_raw_flow_modules_item_value_type_1.additional_properties = d + return completed_job_raw_flow_modules_item_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_1_type.py new file mode 100644 index 0000000000..bdc30e399d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CompletedJobRawFlowModulesItemValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2.py new file mode 100644 index 0000000000..e2ea3fe4b5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2.py @@ -0,0 +1,108 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.completed_job_raw_flow_modules_item_value_type_2_iterator_type_0 import ( + CompletedJobRawFlowModulesItemValueType2IteratorType0, +) +from ..models.completed_job_raw_flow_modules_item_value_type_2_iterator_type_1 import ( + CompletedJobRawFlowModulesItemValueType2IteratorType1, +) +from ..models.completed_job_raw_flow_modules_item_value_type_2_type import CompletedJobRawFlowModulesItemValueType2Type + +T = TypeVar("T", bound="CompletedJobRawFlowModulesItemValueType2") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowModulesItemValueType2: + """ + Attributes: + iterator (Union[CompletedJobRawFlowModulesItemValueType2IteratorType0, + CompletedJobRawFlowModulesItemValueType2IteratorType1]): + skip_failures (bool): + type (CompletedJobRawFlowModulesItemValueType2Type): + """ + + iterator: Union[ + CompletedJobRawFlowModulesItemValueType2IteratorType0, CompletedJobRawFlowModulesItemValueType2IteratorType1 + ] + skip_failures: bool + type: CompletedJobRawFlowModulesItemValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, CompletedJobRawFlowModulesItemValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + CompletedJobRawFlowModulesItemValueType2IteratorType0, CompletedJobRawFlowModulesItemValueType2IteratorType1 + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = CompletedJobRawFlowModulesItemValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = CompletedJobRawFlowModulesItemValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = CompletedJobRawFlowModulesItemValueType2Type(d.pop("type")) + + completed_job_raw_flow_modules_item_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + completed_job_raw_flow_modules_item_value_type_2.additional_properties = d + return completed_job_raw_flow_modules_item_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..f2d03999f8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.completed_job_raw_flow_modules_item_value_type_2_iterator_type_0_type import ( + CompletedJobRawFlowModulesItemValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobRawFlowModulesItemValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowModulesItemValueType2IteratorType0: + """ + Attributes: + type (CompletedJobRawFlowModulesItemValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: CompletedJobRawFlowModulesItemValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = CompletedJobRawFlowModulesItemValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + completed_job_raw_flow_modules_item_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + completed_job_raw_flow_modules_item_value_type_2_iterator_type_0.additional_properties = d + return completed_job_raw_flow_modules_item_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..df1aa24550 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CompletedJobRawFlowModulesItemValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..30448e7337 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.completed_job_raw_flow_modules_item_value_type_2_iterator_type_1_type import ( + CompletedJobRawFlowModulesItemValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="CompletedJobRawFlowModulesItemValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowModulesItemValueType2IteratorType1: + """ + Attributes: + expr (str): + type (CompletedJobRawFlowModulesItemValueType2IteratorType1Type): + """ + + expr: str + type: CompletedJobRawFlowModulesItemValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = CompletedJobRawFlowModulesItemValueType2IteratorType1Type(d.pop("type")) + + completed_job_raw_flow_modules_item_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + completed_job_raw_flow_modules_item_value_type_2_iterator_type_1.additional_properties = d + return completed_job_raw_flow_modules_item_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..dcb3f6dcbc --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CompletedJobRawFlowModulesItemValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2_type.py new file mode 100644 index 0000000000..6febea21f8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CompletedJobRawFlowModulesItemValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_3.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_3.py new file mode 100644 index 0000000000..1d1f6512a0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_3.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.completed_job_raw_flow_modules_item_value_type_3_type import CompletedJobRawFlowModulesItemValueType3Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompletedJobRawFlowModulesItemValueType3") + + +@attr.s(auto_attribs=True) +class CompletedJobRawFlowModulesItemValueType3: + """ + Attributes: + type (CompletedJobRawFlowModulesItemValueType3Type): + path (Union[Unset, str]): + """ + + type: CompletedJobRawFlowModulesItemValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = CompletedJobRawFlowModulesItemValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + completed_job_raw_flow_modules_item_value_type_3 = cls( + type=type, + path=path, + ) + + completed_job_raw_flow_modules_item_value_type_3.additional_properties = d + return completed_job_raw_flow_modules_item_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_3_type.py new file mode 100644 index 0000000000..567341a1f8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_raw_flow_modules_item_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CompletedJobRawFlowModulesItemValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/completed_job_result.py b/python-client/windmill-api/windmill_api/models/completed_job_result.py new file mode 100644 index 0000000000..79f4e8250b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/completed_job_result.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="CompletedJobResult") + + +@attr.s(auto_attribs=True) +class CompletedJobResult: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + completed_job_result = cls() + + completed_job_result.additional_properties = d + return completed_job_result + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/connect_callback_json_body.py b/python-client/windmill-api/windmill_api/models/connect_callback_json_body.py new file mode 100644 index 0000000000..bc8a97de33 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/connect_callback_json_body.py @@ -0,0 +1,64 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ConnectCallbackJsonBody") + + +@attr.s(auto_attribs=True) +class ConnectCallbackJsonBody: + """ + Attributes: + code (str): + state (str): + """ + + code: str + state: str + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code = self.code + state = self.state + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "code": code, + "state": state, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + code = d.pop("code") + + state = d.pop("state") + + connect_callback_json_body = cls( + code=code, + state=state, + ) + + connect_callback_json_body.additional_properties = d + return connect_callback_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/connect_callback_response_200.py b/python-client/windmill-api/windmill_api/models/connect_callback_response_200.py new file mode 100644 index 0000000000..6e6f8fec31 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/connect_callback_response_200.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ConnectCallbackResponse200") + + +@attr.s(auto_attribs=True) +class ConnectCallbackResponse200: + """ + Attributes: + access_token (str): + expires_in (Union[Unset, int]): + refresh_token (Union[Unset, str]): + scope (Union[Unset, List[str]]): + """ + + access_token: str + expires_in: Union[Unset, int] = UNSET + refresh_token: Union[Unset, str] = UNSET + scope: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + access_token = self.access_token + expires_in = self.expires_in + refresh_token = self.refresh_token + scope: Union[Unset, List[str]] = UNSET + if not isinstance(self.scope, Unset): + scope = self.scope + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "access_token": access_token, + } + ) + if expires_in is not UNSET: + field_dict["expires_in"] = expires_in + if refresh_token is not UNSET: + field_dict["refresh_token"] = refresh_token + if scope is not UNSET: + field_dict["scope"] = scope + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + access_token = d.pop("access_token") + + expires_in = d.pop("expires_in", UNSET) + + refresh_token = d.pop("refresh_token", UNSET) + + scope = cast(List[str], d.pop("scope", UNSET)) + + connect_callback_response_200 = cls( + access_token=access_token, + expires_in=expires_in, + refresh_token=refresh_token, + scope=scope, + ) + + connect_callback_response_200.additional_properties = d + return connect_callback_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/connect_slack_callback_json_body.py b/python-client/windmill-api/windmill_api/models/connect_slack_callback_json_body.py new file mode 100644 index 0000000000..ca6cd18ebf --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/connect_slack_callback_json_body.py @@ -0,0 +1,64 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ConnectSlackCallbackJsonBody") + + +@attr.s(auto_attribs=True) +class ConnectSlackCallbackJsonBody: + """ + Attributes: + code (str): + state (str): + """ + + code: str + state: str + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code = self.code + state = self.state + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "code": code, + "state": state, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + code = d.pop("code") + + state = d.pop("state") + + connect_slack_callback_json_body = cls( + code=code, + state=state, + ) + + connect_slack_callback_json_body.additional_properties = d + return connect_slack_callback_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/connect_slack_callback_response_200.py b/python-client/windmill-api/windmill_api/models/connect_slack_callback_response_200.py new file mode 100644 index 0000000000..a2267c0048 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/connect_slack_callback_response_200.py @@ -0,0 +1,80 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.connect_slack_callback_response_200_bot import ConnectSlackCallbackResponse200Bot + +T = TypeVar("T", bound="ConnectSlackCallbackResponse200") + + +@attr.s(auto_attribs=True) +class ConnectSlackCallbackResponse200: + """ + Attributes: + access_token (str): + team_id (str): + team_name (str): + bot (ConnectSlackCallbackResponse200Bot): + """ + + access_token: str + team_id: str + team_name: str + bot: ConnectSlackCallbackResponse200Bot + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + access_token = self.access_token + team_id = self.team_id + team_name = self.team_name + bot = self.bot.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "access_token": access_token, + "team_id": team_id, + "team_name": team_name, + "bot": bot, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + access_token = d.pop("access_token") + + team_id = d.pop("team_id") + + team_name = d.pop("team_name") + + bot = ConnectSlackCallbackResponse200Bot.from_dict(d.pop("bot")) + + connect_slack_callback_response_200 = cls( + access_token=access_token, + team_id=team_id, + team_name=team_name, + bot=bot, + ) + + connect_slack_callback_response_200.additional_properties = d + return connect_slack_callback_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/connect_slack_callback_response_200_bot.py b/python-client/windmill-api/windmill_api/models/connect_slack_callback_response_200_bot.py new file mode 100644 index 0000000000..20191cc8f7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/connect_slack_callback_response_200_bot.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ConnectSlackCallbackResponse200Bot") + + +@attr.s(auto_attribs=True) +class ConnectSlackCallbackResponse200Bot: + """ + Attributes: + bot_access_token (Union[Unset, str]): + """ + + bot_access_token: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + bot_access_token = self.bot_access_token + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if bot_access_token is not UNSET: + field_dict["bot_access_token"] = bot_access_token + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + bot_access_token = d.pop("bot_access_token", UNSET) + + connect_slack_callback_response_200_bot = cls( + bot_access_token=bot_access_token, + ) + + connect_slack_callback_response_200_bot.additional_properties = d + return connect_slack_callback_response_200_bot + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/contextual_variable.py b/python-client/windmill-api/windmill_api/models/contextual_variable.py new file mode 100644 index 0000000000..1afa6f3575 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/contextual_variable.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ContextualVariable") + + +@attr.s(auto_attribs=True) +class ContextualVariable: + """ + Attributes: + name (str): + value (str): + description (str): + """ + + name: str + value: str + description: str + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + value = self.value + description = self.description + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "value": value, + "description": description, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name") + + value = d.pop("value") + + description = d.pop("description") + + contextual_variable = cls( + name=name, + value=value, + description=description, + ) + + contextual_variable.additional_properties = d + return contextual_variable + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_account_json_body.py b/python-client/windmill-api/windmill_api/models/create_account_json_body.py new file mode 100644 index 0000000000..f9923bcbae --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_account_json_body.py @@ -0,0 +1,78 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="CreateAccountJsonBody") + + +@attr.s(auto_attribs=True) +class CreateAccountJsonBody: + """ + Attributes: + refresh_token (str): + expires_in (int): + owner (str): + client (str): + """ + + refresh_token: str + expires_in: int + owner: str + client: str + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + refresh_token = self.refresh_token + expires_in = self.expires_in + owner = self.owner + client = self.client + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "refresh_token": refresh_token, + "expires_in": expires_in, + "owner": owner, + "client": client, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + refresh_token = d.pop("refresh_token") + + expires_in = d.pop("expires_in") + + owner = d.pop("owner") + + client = d.pop("client") + + create_account_json_body = cls( + refresh_token=refresh_token, + expires_in=expires_in, + owner=owner, + client=client, + ) + + create_account_json_body.additional_properties = d + return create_account_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body.py new file mode 100644 index 0000000000..5e3f51f57e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body.py @@ -0,0 +1,99 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.create_flow_json_body_schema import CreateFlowJsonBodySchema +from ..models.create_flow_json_body_value import CreateFlowJsonBodyValue +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateFlowJsonBody") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBody: + """ + Attributes: + summary (str): + value (CreateFlowJsonBodyValue): + path (str): + description (Union[Unset, str]): + schema (Union[Unset, CreateFlowJsonBodySchema]): + """ + + summary: str + value: CreateFlowJsonBodyValue + path: str + description: Union[Unset, str] = UNSET + schema: Union[Unset, CreateFlowJsonBodySchema] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + summary = self.summary + value = self.value.to_dict() + + path = self.path + description = self.description + schema: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.schema, Unset): + schema = self.schema.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "summary": summary, + "value": value, + "path": path, + } + ) + if description is not UNSET: + field_dict["description"] = description + if schema is not UNSET: + field_dict["schema"] = schema + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + summary = d.pop("summary") + + value = CreateFlowJsonBodyValue.from_dict(d.pop("value")) + + path = d.pop("path") + + description = d.pop("description", UNSET) + + _schema = d.pop("schema", UNSET) + schema: Union[Unset, CreateFlowJsonBodySchema] + if isinstance(_schema, Unset): + schema = UNSET + else: + schema = CreateFlowJsonBodySchema.from_dict(_schema) + + create_flow_json_body = cls( + summary=summary, + value=value, + path=path, + description=description, + schema=schema, + ) + + create_flow_json_body.additional_properties = d + return create_flow_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_schema.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_schema.py new file mode 100644 index 0000000000..ba407f70ea --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_schema.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="CreateFlowJsonBodySchema") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodySchema: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + create_flow_json_body_schema = cls() + + create_flow_json_body_schema.additional_properties = d + return create_flow_json_body_schema + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value.py new file mode 100644 index 0000000000..c194129a29 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value.py @@ -0,0 +1,95 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.create_flow_json_body_value_failure_module import CreateFlowJsonBodyValueFailureModule +from ..models.create_flow_json_body_value_modules_item import CreateFlowJsonBodyValueModulesItem +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateFlowJsonBodyValue") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValue: + """ + Attributes: + modules (List[CreateFlowJsonBodyValueModulesItem]): + failure_module (Union[Unset, CreateFlowJsonBodyValueFailureModule]): + same_worker (Union[Unset, bool]): + """ + + modules: List[CreateFlowJsonBodyValueModulesItem] + failure_module: Union[Unset, CreateFlowJsonBodyValueFailureModule] = UNSET + same_worker: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + modules = [] + for modules_item_data in self.modules: + modules_item = modules_item_data.to_dict() + + modules.append(modules_item) + + failure_module: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.failure_module, Unset): + failure_module = self.failure_module.to_dict() + + same_worker = self.same_worker + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "modules": modules, + } + ) + if failure_module is not UNSET: + field_dict["failure_module"] = failure_module + if same_worker is not UNSET: + field_dict["same_worker"] = same_worker + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + modules = [] + _modules = d.pop("modules") + for modules_item_data in _modules: + modules_item = CreateFlowJsonBodyValueModulesItem.from_dict(modules_item_data) + + modules.append(modules_item) + + _failure_module = d.pop("failure_module", UNSET) + failure_module: Union[Unset, CreateFlowJsonBodyValueFailureModule] + if isinstance(_failure_module, Unset): + failure_module = UNSET + else: + failure_module = CreateFlowJsonBodyValueFailureModule.from_dict(_failure_module) + + same_worker = d.pop("same_worker", UNSET) + + create_flow_json_body_value = cls( + modules=modules, + failure_module=failure_module, + same_worker=same_worker, + ) + + create_flow_json_body_value.additional_properties = d + return create_flow_json_body_value + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module.py new file mode 100644 index 0000000000..6d5f9c4abf --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module.py @@ -0,0 +1,249 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.create_flow_json_body_value_failure_module_input_transforms import ( + CreateFlowJsonBodyValueFailureModuleInputTransforms, +) +from ..models.create_flow_json_body_value_failure_module_retry import CreateFlowJsonBodyValueFailureModuleRetry +from ..models.create_flow_json_body_value_failure_module_sleep_type_0 import ( + CreateFlowJsonBodyValueFailureModuleSleepType0, +) +from ..models.create_flow_json_body_value_failure_module_sleep_type_1 import ( + CreateFlowJsonBodyValueFailureModuleSleepType1, +) +from ..models.create_flow_json_body_value_failure_module_stop_after_if import ( + CreateFlowJsonBodyValueFailureModuleStopAfterIf, +) +from ..models.create_flow_json_body_value_failure_module_value_type_0 import ( + CreateFlowJsonBodyValueFailureModuleValueType0, +) +from ..models.create_flow_json_body_value_failure_module_value_type_1 import ( + CreateFlowJsonBodyValueFailureModuleValueType1, +) +from ..models.create_flow_json_body_value_failure_module_value_type_2 import ( + CreateFlowJsonBodyValueFailureModuleValueType2, +) +from ..models.create_flow_json_body_value_failure_module_value_type_3 import ( + CreateFlowJsonBodyValueFailureModuleValueType3, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateFlowJsonBodyValueFailureModule") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueFailureModule: + """ + Attributes: + input_transforms (CreateFlowJsonBodyValueFailureModuleInputTransforms): + value (Union[CreateFlowJsonBodyValueFailureModuleValueType0, CreateFlowJsonBodyValueFailureModuleValueType1, + CreateFlowJsonBodyValueFailureModuleValueType2, CreateFlowJsonBodyValueFailureModuleValueType3]): + stop_after_if (Union[Unset, CreateFlowJsonBodyValueFailureModuleStopAfterIf]): + sleep (Union[CreateFlowJsonBodyValueFailureModuleSleepType0, CreateFlowJsonBodyValueFailureModuleSleepType1, + Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, CreateFlowJsonBodyValueFailureModuleRetry]): + """ + + input_transforms: CreateFlowJsonBodyValueFailureModuleInputTransforms + value: Union[ + CreateFlowJsonBodyValueFailureModuleValueType0, + CreateFlowJsonBodyValueFailureModuleValueType1, + CreateFlowJsonBodyValueFailureModuleValueType2, + CreateFlowJsonBodyValueFailureModuleValueType3, + ] + stop_after_if: Union[Unset, CreateFlowJsonBodyValueFailureModuleStopAfterIf] = UNSET + sleep: Union[ + CreateFlowJsonBodyValueFailureModuleSleepType0, CreateFlowJsonBodyValueFailureModuleSleepType1, Unset + ] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, CreateFlowJsonBodyValueFailureModuleRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, CreateFlowJsonBodyValueFailureModuleValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, CreateFlowJsonBodyValueFailureModuleValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, CreateFlowJsonBodyValueFailureModuleValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, CreateFlowJsonBodyValueFailureModuleSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = CreateFlowJsonBodyValueFailureModuleInputTransforms.from_dict(d.pop("input_transforms")) + + def _parse_value( + data: object, + ) -> Union[ + CreateFlowJsonBodyValueFailureModuleValueType0, + CreateFlowJsonBodyValueFailureModuleValueType1, + CreateFlowJsonBodyValueFailureModuleValueType2, + CreateFlowJsonBodyValueFailureModuleValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = CreateFlowJsonBodyValueFailureModuleValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = CreateFlowJsonBodyValueFailureModuleValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = CreateFlowJsonBodyValueFailureModuleValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = CreateFlowJsonBodyValueFailureModuleValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, CreateFlowJsonBodyValueFailureModuleStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = CreateFlowJsonBodyValueFailureModuleStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[ + CreateFlowJsonBodyValueFailureModuleSleepType0, CreateFlowJsonBodyValueFailureModuleSleepType1, Unset + ]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, CreateFlowJsonBodyValueFailureModuleSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = CreateFlowJsonBodyValueFailureModuleSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, CreateFlowJsonBodyValueFailureModuleSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = CreateFlowJsonBodyValueFailureModuleSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, CreateFlowJsonBodyValueFailureModuleRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = CreateFlowJsonBodyValueFailureModuleRetry.from_dict(_retry) + + create_flow_json_body_value_failure_module = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + create_flow_json_body_value_failure_module.additional_properties = d + return create_flow_json_body_value_failure_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_input_transforms.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_input_transforms.py new file mode 100644 index 0000000000..dc1d86361e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_input_transforms.py @@ -0,0 +1,107 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.create_flow_json_body_value_failure_module_input_transforms_additional_property_type_0 import ( + CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0, +) +from ..models.create_flow_json_body_value_failure_module_input_transforms_additional_property_type_1 import ( + CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="CreateFlowJsonBodyValueFailureModuleInputTransforms") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueFailureModuleInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0, + CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + create_flow_json_body_value_failure_module_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0, + CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0.from_dict(data) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1.from_dict(data) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + create_flow_json_body_value_failure_module_input_transforms.additional_properties = additional_properties + return create_flow_json_body_value_failure_module_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0, + CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0, + CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..8f579a1479 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_input_transforms_additional_property_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.create_flow_json_body_value_failure_module_input_transforms_additional_property_type_0_type import ( + CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + create_flow_json_body_value_failure_module_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + create_flow_json_body_value_failure_module_input_transforms_additional_property_type_0.additional_properties = d + return create_flow_json_body_value_failure_module_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..42b4d13a78 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..cc955707d7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_input_transforms_additional_property_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.create_flow_json_body_value_failure_module_input_transforms_additional_property_type_1_type import ( + CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + create_flow_json_body_value_failure_module_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + create_flow_json_body_value_failure_module_input_transforms_additional_property_type_1.additional_properties = d + return create_flow_json_body_value_failure_module_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..9f26d0fd43 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_retry.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_retry.py new file mode 100644 index 0000000000..a2cf40de98 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_retry.py @@ -0,0 +1,86 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.create_flow_json_body_value_failure_module_retry_constant import ( + CreateFlowJsonBodyValueFailureModuleRetryConstant, +) +from ..models.create_flow_json_body_value_failure_module_retry_exponential import ( + CreateFlowJsonBodyValueFailureModuleRetryExponential, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateFlowJsonBodyValueFailureModuleRetry") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueFailureModuleRetry: + """ + Attributes: + constant (Union[Unset, CreateFlowJsonBodyValueFailureModuleRetryConstant]): + exponential (Union[Unset, CreateFlowJsonBodyValueFailureModuleRetryExponential]): + """ + + constant: Union[Unset, CreateFlowJsonBodyValueFailureModuleRetryConstant] = UNSET + exponential: Union[Unset, CreateFlowJsonBodyValueFailureModuleRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, CreateFlowJsonBodyValueFailureModuleRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = CreateFlowJsonBodyValueFailureModuleRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, CreateFlowJsonBodyValueFailureModuleRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = CreateFlowJsonBodyValueFailureModuleRetryExponential.from_dict(_exponential) + + create_flow_json_body_value_failure_module_retry = cls( + constant=constant, + exponential=exponential, + ) + + create_flow_json_body_value_failure_module_retry.additional_properties = d + return create_flow_json_body_value_failure_module_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_retry_constant.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_retry_constant.py new file mode 100644 index 0000000000..081cf41e8e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateFlowJsonBodyValueFailureModuleRetryConstant") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueFailureModuleRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + create_flow_json_body_value_failure_module_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + create_flow_json_body_value_failure_module_retry_constant.additional_properties = d + return create_flow_json_body_value_failure_module_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_retry_exponential.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_retry_exponential.py new file mode 100644 index 0000000000..fd00d074c8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateFlowJsonBodyValueFailureModuleRetryExponential") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueFailureModuleRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + create_flow_json_body_value_failure_module_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + create_flow_json_body_value_failure_module_retry_exponential.additional_properties = d + return create_flow_json_body_value_failure_module_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_sleep_type_0.py new file mode 100644 index 0000000000..ad86a97eff --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_sleep_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.create_flow_json_body_value_failure_module_sleep_type_0_type import ( + CreateFlowJsonBodyValueFailureModuleSleepType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateFlowJsonBodyValueFailureModuleSleepType0") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueFailureModuleSleepType0: + """ + Attributes: + type (CreateFlowJsonBodyValueFailureModuleSleepType0Type): + value (Union[Unset, Any]): + """ + + type: CreateFlowJsonBodyValueFailureModuleSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = CreateFlowJsonBodyValueFailureModuleSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + create_flow_json_body_value_failure_module_sleep_type_0 = cls( + type=type, + value=value, + ) + + create_flow_json_body_value_failure_module_sleep_type_0.additional_properties = d + return create_flow_json_body_value_failure_module_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_sleep_type_0_type.py new file mode 100644 index 0000000000..a769ac72e4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CreateFlowJsonBodyValueFailureModuleSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_sleep_type_1.py new file mode 100644 index 0000000000..d65347f3c1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_sleep_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.create_flow_json_body_value_failure_module_sleep_type_1_type import ( + CreateFlowJsonBodyValueFailureModuleSleepType1Type, +) + +T = TypeVar("T", bound="CreateFlowJsonBodyValueFailureModuleSleepType1") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueFailureModuleSleepType1: + """ + Attributes: + expr (str): + type (CreateFlowJsonBodyValueFailureModuleSleepType1Type): + """ + + expr: str + type: CreateFlowJsonBodyValueFailureModuleSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = CreateFlowJsonBodyValueFailureModuleSleepType1Type(d.pop("type")) + + create_flow_json_body_value_failure_module_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + create_flow_json_body_value_failure_module_sleep_type_1.additional_properties = d + return create_flow_json_body_value_failure_module_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_sleep_type_1_type.py new file mode 100644 index 0000000000..563ae5dc71 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CreateFlowJsonBodyValueFailureModuleSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_stop_after_if.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_stop_after_if.py new file mode 100644 index 0000000000..f634167838 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateFlowJsonBodyValueFailureModuleStopAfterIf") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueFailureModuleStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + create_flow_json_body_value_failure_module_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + create_flow_json_body_value_failure_module_stop_after_if.additional_properties = d + return create_flow_json_body_value_failure_module_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_0.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_0.py new file mode 100644 index 0000000000..3e1ae1d359 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.create_flow_json_body_value_failure_module_value_type_0_language import ( + CreateFlowJsonBodyValueFailureModuleValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateFlowJsonBodyValueFailureModuleValueType0") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueFailureModuleValueType0: + """ + Attributes: + content (str): + language (CreateFlowJsonBodyValueFailureModuleValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: CreateFlowJsonBodyValueFailureModuleValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = CreateFlowJsonBodyValueFailureModuleValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + create_flow_json_body_value_failure_module_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + create_flow_json_body_value_failure_module_value_type_0.additional_properties = d + return create_flow_json_body_value_failure_module_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_0_language.py new file mode 100644 index 0000000000..f51a614268 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class CreateFlowJsonBodyValueFailureModuleValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_1.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_1.py new file mode 100644 index 0000000000..d2e5c5cce5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.create_flow_json_body_value_failure_module_value_type_1_type import ( + CreateFlowJsonBodyValueFailureModuleValueType1Type, +) + +T = TypeVar("T", bound="CreateFlowJsonBodyValueFailureModuleValueType1") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueFailureModuleValueType1: + """ + Attributes: + path (str): + type (CreateFlowJsonBodyValueFailureModuleValueType1Type): + """ + + path: str + type: CreateFlowJsonBodyValueFailureModuleValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = CreateFlowJsonBodyValueFailureModuleValueType1Type(d.pop("type")) + + create_flow_json_body_value_failure_module_value_type_1 = cls( + path=path, + type=type, + ) + + create_flow_json_body_value_failure_module_value_type_1.additional_properties = d + return create_flow_json_body_value_failure_module_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_1_type.py new file mode 100644 index 0000000000..dd6b888b32 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CreateFlowJsonBodyValueFailureModuleValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2.py new file mode 100644 index 0000000000..ffbbe9b700 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2.py @@ -0,0 +1,112 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.create_flow_json_body_value_failure_module_value_type_2_iterator_type_0 import ( + CreateFlowJsonBodyValueFailureModuleValueType2IteratorType0, +) +from ..models.create_flow_json_body_value_failure_module_value_type_2_iterator_type_1 import ( + CreateFlowJsonBodyValueFailureModuleValueType2IteratorType1, +) +from ..models.create_flow_json_body_value_failure_module_value_type_2_type import ( + CreateFlowJsonBodyValueFailureModuleValueType2Type, +) + +T = TypeVar("T", bound="CreateFlowJsonBodyValueFailureModuleValueType2") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueFailureModuleValueType2: + """ + Attributes: + iterator (Union[CreateFlowJsonBodyValueFailureModuleValueType2IteratorType0, + CreateFlowJsonBodyValueFailureModuleValueType2IteratorType1]): + skip_failures (bool): + type (CreateFlowJsonBodyValueFailureModuleValueType2Type): + """ + + iterator: Union[ + CreateFlowJsonBodyValueFailureModuleValueType2IteratorType0, + CreateFlowJsonBodyValueFailureModuleValueType2IteratorType1, + ] + skip_failures: bool + type: CreateFlowJsonBodyValueFailureModuleValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, CreateFlowJsonBodyValueFailureModuleValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + CreateFlowJsonBodyValueFailureModuleValueType2IteratorType0, + CreateFlowJsonBodyValueFailureModuleValueType2IteratorType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = CreateFlowJsonBodyValueFailureModuleValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = CreateFlowJsonBodyValueFailureModuleValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = CreateFlowJsonBodyValueFailureModuleValueType2Type(d.pop("type")) + + create_flow_json_body_value_failure_module_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + create_flow_json_body_value_failure_module_value_type_2.additional_properties = d + return create_flow_json_body_value_failure_module_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..6146a423f2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.create_flow_json_body_value_failure_module_value_type_2_iterator_type_0_type import ( + CreateFlowJsonBodyValueFailureModuleValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateFlowJsonBodyValueFailureModuleValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueFailureModuleValueType2IteratorType0: + """ + Attributes: + type (CreateFlowJsonBodyValueFailureModuleValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: CreateFlowJsonBodyValueFailureModuleValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = CreateFlowJsonBodyValueFailureModuleValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + create_flow_json_body_value_failure_module_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + create_flow_json_body_value_failure_module_value_type_2_iterator_type_0.additional_properties = d + return create_flow_json_body_value_failure_module_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..3b54363bcf --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CreateFlowJsonBodyValueFailureModuleValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..629c89a7ba --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.create_flow_json_body_value_failure_module_value_type_2_iterator_type_1_type import ( + CreateFlowJsonBodyValueFailureModuleValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="CreateFlowJsonBodyValueFailureModuleValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueFailureModuleValueType2IteratorType1: + """ + Attributes: + expr (str): + type (CreateFlowJsonBodyValueFailureModuleValueType2IteratorType1Type): + """ + + expr: str + type: CreateFlowJsonBodyValueFailureModuleValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = CreateFlowJsonBodyValueFailureModuleValueType2IteratorType1Type(d.pop("type")) + + create_flow_json_body_value_failure_module_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + create_flow_json_body_value_failure_module_value_type_2_iterator_type_1.additional_properties = d + return create_flow_json_body_value_failure_module_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..0e53c14ac6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CreateFlowJsonBodyValueFailureModuleValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2_type.py new file mode 100644 index 0000000000..97b19618c2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CreateFlowJsonBodyValueFailureModuleValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_3.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_3.py new file mode 100644 index 0000000000..e5eecb2959 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_3.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.create_flow_json_body_value_failure_module_value_type_3_type import ( + CreateFlowJsonBodyValueFailureModuleValueType3Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateFlowJsonBodyValueFailureModuleValueType3") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueFailureModuleValueType3: + """ + Attributes: + type (CreateFlowJsonBodyValueFailureModuleValueType3Type): + path (Union[Unset, str]): + """ + + type: CreateFlowJsonBodyValueFailureModuleValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = CreateFlowJsonBodyValueFailureModuleValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + create_flow_json_body_value_failure_module_value_type_3 = cls( + type=type, + path=path, + ) + + create_flow_json_body_value_failure_module_value_type_3.additional_properties = d + return create_flow_json_body_value_failure_module_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_3_type.py new file mode 100644 index 0000000000..e8cf409ece --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_failure_module_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CreateFlowJsonBodyValueFailureModuleValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item.py new file mode 100644 index 0000000000..cbfffb1f22 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item.py @@ -0,0 +1,235 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.create_flow_json_body_value_modules_item_input_transforms import ( + CreateFlowJsonBodyValueModulesItemInputTransforms, +) +from ..models.create_flow_json_body_value_modules_item_retry import CreateFlowJsonBodyValueModulesItemRetry +from ..models.create_flow_json_body_value_modules_item_sleep_type_0 import CreateFlowJsonBodyValueModulesItemSleepType0 +from ..models.create_flow_json_body_value_modules_item_sleep_type_1 import CreateFlowJsonBodyValueModulesItemSleepType1 +from ..models.create_flow_json_body_value_modules_item_stop_after_if import ( + CreateFlowJsonBodyValueModulesItemStopAfterIf, +) +from ..models.create_flow_json_body_value_modules_item_value_type_0 import CreateFlowJsonBodyValueModulesItemValueType0 +from ..models.create_flow_json_body_value_modules_item_value_type_1 import CreateFlowJsonBodyValueModulesItemValueType1 +from ..models.create_flow_json_body_value_modules_item_value_type_2 import CreateFlowJsonBodyValueModulesItemValueType2 +from ..models.create_flow_json_body_value_modules_item_value_type_3 import CreateFlowJsonBodyValueModulesItemValueType3 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateFlowJsonBodyValueModulesItem") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueModulesItem: + """ + Attributes: + input_transforms (CreateFlowJsonBodyValueModulesItemInputTransforms): + value (Union[CreateFlowJsonBodyValueModulesItemValueType0, CreateFlowJsonBodyValueModulesItemValueType1, + CreateFlowJsonBodyValueModulesItemValueType2, CreateFlowJsonBodyValueModulesItemValueType3]): + stop_after_if (Union[Unset, CreateFlowJsonBodyValueModulesItemStopAfterIf]): + sleep (Union[CreateFlowJsonBodyValueModulesItemSleepType0, CreateFlowJsonBodyValueModulesItemSleepType1, + Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, CreateFlowJsonBodyValueModulesItemRetry]): + """ + + input_transforms: CreateFlowJsonBodyValueModulesItemInputTransforms + value: Union[ + CreateFlowJsonBodyValueModulesItemValueType0, + CreateFlowJsonBodyValueModulesItemValueType1, + CreateFlowJsonBodyValueModulesItemValueType2, + CreateFlowJsonBodyValueModulesItemValueType3, + ] + stop_after_if: Union[Unset, CreateFlowJsonBodyValueModulesItemStopAfterIf] = UNSET + sleep: Union[ + CreateFlowJsonBodyValueModulesItemSleepType0, CreateFlowJsonBodyValueModulesItemSleepType1, Unset + ] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, CreateFlowJsonBodyValueModulesItemRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, CreateFlowJsonBodyValueModulesItemValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, CreateFlowJsonBodyValueModulesItemValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, CreateFlowJsonBodyValueModulesItemValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, CreateFlowJsonBodyValueModulesItemSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = CreateFlowJsonBodyValueModulesItemInputTransforms.from_dict(d.pop("input_transforms")) + + def _parse_value( + data: object, + ) -> Union[ + CreateFlowJsonBodyValueModulesItemValueType0, + CreateFlowJsonBodyValueModulesItemValueType1, + CreateFlowJsonBodyValueModulesItemValueType2, + CreateFlowJsonBodyValueModulesItemValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = CreateFlowJsonBodyValueModulesItemValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = CreateFlowJsonBodyValueModulesItemValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = CreateFlowJsonBodyValueModulesItemValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = CreateFlowJsonBodyValueModulesItemValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, CreateFlowJsonBodyValueModulesItemStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = CreateFlowJsonBodyValueModulesItemStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[CreateFlowJsonBodyValueModulesItemSleepType0, CreateFlowJsonBodyValueModulesItemSleepType1, Unset]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, CreateFlowJsonBodyValueModulesItemSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = CreateFlowJsonBodyValueModulesItemSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, CreateFlowJsonBodyValueModulesItemSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = CreateFlowJsonBodyValueModulesItemSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, CreateFlowJsonBodyValueModulesItemRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = CreateFlowJsonBodyValueModulesItemRetry.from_dict(_retry) + + create_flow_json_body_value_modules_item = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + create_flow_json_body_value_modules_item.additional_properties = d + return create_flow_json_body_value_modules_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_input_transforms.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_input_transforms.py new file mode 100644 index 0000000000..d687b869ce --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_input_transforms.py @@ -0,0 +1,107 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.create_flow_json_body_value_modules_item_input_transforms_additional_property_type_0 import ( + CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0, +) +from ..models.create_flow_json_body_value_modules_item_input_transforms_additional_property_type_1 import ( + CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="CreateFlowJsonBodyValueModulesItemInputTransforms") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueModulesItemInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0, + CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + create_flow_json_body_value_modules_item_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0, + CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0.from_dict(data) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1.from_dict(data) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + create_flow_json_body_value_modules_item_input_transforms.additional_properties = additional_properties + return create_flow_json_body_value_modules_item_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0, + CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0, + CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..920781c8fa --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_input_transforms_additional_property_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.create_flow_json_body_value_modules_item_input_transforms_additional_property_type_0_type import ( + CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + create_flow_json_body_value_modules_item_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + create_flow_json_body_value_modules_item_input_transforms_additional_property_type_0.additional_properties = d + return create_flow_json_body_value_modules_item_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..9bd7f3b694 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..24b15fc380 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_input_transforms_additional_property_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.create_flow_json_body_value_modules_item_input_transforms_additional_property_type_1_type import ( + CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + create_flow_json_body_value_modules_item_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + create_flow_json_body_value_modules_item_input_transforms_additional_property_type_1.additional_properties = d + return create_flow_json_body_value_modules_item_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..e6a8f3eaf8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CreateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_retry.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_retry.py new file mode 100644 index 0000000000..e93a59d16c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_retry.py @@ -0,0 +1,86 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.create_flow_json_body_value_modules_item_retry_constant import ( + CreateFlowJsonBodyValueModulesItemRetryConstant, +) +from ..models.create_flow_json_body_value_modules_item_retry_exponential import ( + CreateFlowJsonBodyValueModulesItemRetryExponential, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateFlowJsonBodyValueModulesItemRetry") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueModulesItemRetry: + """ + Attributes: + constant (Union[Unset, CreateFlowJsonBodyValueModulesItemRetryConstant]): + exponential (Union[Unset, CreateFlowJsonBodyValueModulesItemRetryExponential]): + """ + + constant: Union[Unset, CreateFlowJsonBodyValueModulesItemRetryConstant] = UNSET + exponential: Union[Unset, CreateFlowJsonBodyValueModulesItemRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, CreateFlowJsonBodyValueModulesItemRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = CreateFlowJsonBodyValueModulesItemRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, CreateFlowJsonBodyValueModulesItemRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = CreateFlowJsonBodyValueModulesItemRetryExponential.from_dict(_exponential) + + create_flow_json_body_value_modules_item_retry = cls( + constant=constant, + exponential=exponential, + ) + + create_flow_json_body_value_modules_item_retry.additional_properties = d + return create_flow_json_body_value_modules_item_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_retry_constant.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_retry_constant.py new file mode 100644 index 0000000000..ddeba91005 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateFlowJsonBodyValueModulesItemRetryConstant") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueModulesItemRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + create_flow_json_body_value_modules_item_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + create_flow_json_body_value_modules_item_retry_constant.additional_properties = d + return create_flow_json_body_value_modules_item_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_retry_exponential.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_retry_exponential.py new file mode 100644 index 0000000000..3d15cb38da --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateFlowJsonBodyValueModulesItemRetryExponential") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueModulesItemRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + create_flow_json_body_value_modules_item_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + create_flow_json_body_value_modules_item_retry_exponential.additional_properties = d + return create_flow_json_body_value_modules_item_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_sleep_type_0.py new file mode 100644 index 0000000000..9fc611072d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_sleep_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.create_flow_json_body_value_modules_item_sleep_type_0_type import ( + CreateFlowJsonBodyValueModulesItemSleepType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateFlowJsonBodyValueModulesItemSleepType0") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueModulesItemSleepType0: + """ + Attributes: + type (CreateFlowJsonBodyValueModulesItemSleepType0Type): + value (Union[Unset, Any]): + """ + + type: CreateFlowJsonBodyValueModulesItemSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = CreateFlowJsonBodyValueModulesItemSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + create_flow_json_body_value_modules_item_sleep_type_0 = cls( + type=type, + value=value, + ) + + create_flow_json_body_value_modules_item_sleep_type_0.additional_properties = d + return create_flow_json_body_value_modules_item_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_sleep_type_0_type.py new file mode 100644 index 0000000000..89af6746bd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CreateFlowJsonBodyValueModulesItemSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_sleep_type_1.py new file mode 100644 index 0000000000..75232f98fe --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_sleep_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.create_flow_json_body_value_modules_item_sleep_type_1_type import ( + CreateFlowJsonBodyValueModulesItemSleepType1Type, +) + +T = TypeVar("T", bound="CreateFlowJsonBodyValueModulesItemSleepType1") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueModulesItemSleepType1: + """ + Attributes: + expr (str): + type (CreateFlowJsonBodyValueModulesItemSleepType1Type): + """ + + expr: str + type: CreateFlowJsonBodyValueModulesItemSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = CreateFlowJsonBodyValueModulesItemSleepType1Type(d.pop("type")) + + create_flow_json_body_value_modules_item_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + create_flow_json_body_value_modules_item_sleep_type_1.additional_properties = d + return create_flow_json_body_value_modules_item_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_sleep_type_1_type.py new file mode 100644 index 0000000000..93ec97454b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CreateFlowJsonBodyValueModulesItemSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_stop_after_if.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_stop_after_if.py new file mode 100644 index 0000000000..56837ac0c5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateFlowJsonBodyValueModulesItemStopAfterIf") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueModulesItemStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + create_flow_json_body_value_modules_item_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + create_flow_json_body_value_modules_item_stop_after_if.additional_properties = d + return create_flow_json_body_value_modules_item_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_0.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_0.py new file mode 100644 index 0000000000..48cb9e021e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.create_flow_json_body_value_modules_item_value_type_0_language import ( + CreateFlowJsonBodyValueModulesItemValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateFlowJsonBodyValueModulesItemValueType0") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueModulesItemValueType0: + """ + Attributes: + content (str): + language (CreateFlowJsonBodyValueModulesItemValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: CreateFlowJsonBodyValueModulesItemValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = CreateFlowJsonBodyValueModulesItemValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + create_flow_json_body_value_modules_item_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + create_flow_json_body_value_modules_item_value_type_0.additional_properties = d + return create_flow_json_body_value_modules_item_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_0_language.py new file mode 100644 index 0000000000..0afe073137 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class CreateFlowJsonBodyValueModulesItemValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_1.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_1.py new file mode 100644 index 0000000000..31239154d2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.create_flow_json_body_value_modules_item_value_type_1_type import ( + CreateFlowJsonBodyValueModulesItemValueType1Type, +) + +T = TypeVar("T", bound="CreateFlowJsonBodyValueModulesItemValueType1") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueModulesItemValueType1: + """ + Attributes: + path (str): + type (CreateFlowJsonBodyValueModulesItemValueType1Type): + """ + + path: str + type: CreateFlowJsonBodyValueModulesItemValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = CreateFlowJsonBodyValueModulesItemValueType1Type(d.pop("type")) + + create_flow_json_body_value_modules_item_value_type_1 = cls( + path=path, + type=type, + ) + + create_flow_json_body_value_modules_item_value_type_1.additional_properties = d + return create_flow_json_body_value_modules_item_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_1_type.py new file mode 100644 index 0000000000..7ac3bdc3dc --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CreateFlowJsonBodyValueModulesItemValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2.py new file mode 100644 index 0000000000..6d2539d744 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2.py @@ -0,0 +1,112 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.create_flow_json_body_value_modules_item_value_type_2_iterator_type_0 import ( + CreateFlowJsonBodyValueModulesItemValueType2IteratorType0, +) +from ..models.create_flow_json_body_value_modules_item_value_type_2_iterator_type_1 import ( + CreateFlowJsonBodyValueModulesItemValueType2IteratorType1, +) +from ..models.create_flow_json_body_value_modules_item_value_type_2_type import ( + CreateFlowJsonBodyValueModulesItemValueType2Type, +) + +T = TypeVar("T", bound="CreateFlowJsonBodyValueModulesItemValueType2") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueModulesItemValueType2: + """ + Attributes: + iterator (Union[CreateFlowJsonBodyValueModulesItemValueType2IteratorType0, + CreateFlowJsonBodyValueModulesItemValueType2IteratorType1]): + skip_failures (bool): + type (CreateFlowJsonBodyValueModulesItemValueType2Type): + """ + + iterator: Union[ + CreateFlowJsonBodyValueModulesItemValueType2IteratorType0, + CreateFlowJsonBodyValueModulesItemValueType2IteratorType1, + ] + skip_failures: bool + type: CreateFlowJsonBodyValueModulesItemValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, CreateFlowJsonBodyValueModulesItemValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + CreateFlowJsonBodyValueModulesItemValueType2IteratorType0, + CreateFlowJsonBodyValueModulesItemValueType2IteratorType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = CreateFlowJsonBodyValueModulesItemValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = CreateFlowJsonBodyValueModulesItemValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = CreateFlowJsonBodyValueModulesItemValueType2Type(d.pop("type")) + + create_flow_json_body_value_modules_item_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + create_flow_json_body_value_modules_item_value_type_2.additional_properties = d + return create_flow_json_body_value_modules_item_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..14bdff6f4c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.create_flow_json_body_value_modules_item_value_type_2_iterator_type_0_type import ( + CreateFlowJsonBodyValueModulesItemValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateFlowJsonBodyValueModulesItemValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueModulesItemValueType2IteratorType0: + """ + Attributes: + type (CreateFlowJsonBodyValueModulesItemValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: CreateFlowJsonBodyValueModulesItemValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = CreateFlowJsonBodyValueModulesItemValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + create_flow_json_body_value_modules_item_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + create_flow_json_body_value_modules_item_value_type_2_iterator_type_0.additional_properties = d + return create_flow_json_body_value_modules_item_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..340770e8bf --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CreateFlowJsonBodyValueModulesItemValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..c9a27c27bf --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.create_flow_json_body_value_modules_item_value_type_2_iterator_type_1_type import ( + CreateFlowJsonBodyValueModulesItemValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="CreateFlowJsonBodyValueModulesItemValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueModulesItemValueType2IteratorType1: + """ + Attributes: + expr (str): + type (CreateFlowJsonBodyValueModulesItemValueType2IteratorType1Type): + """ + + expr: str + type: CreateFlowJsonBodyValueModulesItemValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = CreateFlowJsonBodyValueModulesItemValueType2IteratorType1Type(d.pop("type")) + + create_flow_json_body_value_modules_item_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + create_flow_json_body_value_modules_item_value_type_2_iterator_type_1.additional_properties = d + return create_flow_json_body_value_modules_item_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..be9f806fa5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CreateFlowJsonBodyValueModulesItemValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2_type.py new file mode 100644 index 0000000000..1bf7ecd617 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CreateFlowJsonBodyValueModulesItemValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_3.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_3.py new file mode 100644 index 0000000000..f33f08e02a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_3.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.create_flow_json_body_value_modules_item_value_type_3_type import ( + CreateFlowJsonBodyValueModulesItemValueType3Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateFlowJsonBodyValueModulesItemValueType3") + + +@attr.s(auto_attribs=True) +class CreateFlowJsonBodyValueModulesItemValueType3: + """ + Attributes: + type (CreateFlowJsonBodyValueModulesItemValueType3Type): + path (Union[Unset, str]): + """ + + type: CreateFlowJsonBodyValueModulesItemValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = CreateFlowJsonBodyValueModulesItemValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + create_flow_json_body_value_modules_item_value_type_3 = cls( + type=type, + path=path, + ) + + create_flow_json_body_value_modules_item_value_type_3.additional_properties = d + return create_flow_json_body_value_modules_item_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_3_type.py new file mode 100644 index 0000000000..ee16f31909 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_flow_json_body_value_modules_item_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CreateFlowJsonBodyValueModulesItemValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/create_group_json_body.py b/python-client/windmill-api/windmill_api/models/create_group_json_body.py new file mode 100644 index 0000000000..a4bf93f44a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_group_json_body.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateGroupJsonBody") + + +@attr.s(auto_attribs=True) +class CreateGroupJsonBody: + """ + Attributes: + name (str): + summary (Union[Unset, str]): + """ + + name: str + summary: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + summary = self.summary + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if summary is not UNSET: + field_dict["summary"] = summary + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name") + + summary = d.pop("summary", UNSET) + + create_group_json_body = cls( + name=name, + summary=summary, + ) + + create_group_json_body.additional_properties = d + return create_group_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_resource.py b/python-client/windmill-api/windmill_api/models/create_resource.py new file mode 100644 index 0000000000..cd2e164a7a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_resource.py @@ -0,0 +1,91 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.create_resource_value import CreateResourceValue +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateResource") + + +@attr.s(auto_attribs=True) +class CreateResource: + """ + Attributes: + path (str): + value (CreateResourceValue): + resource_type (str): + description (Union[Unset, str]): + is_oauth (Union[Unset, bool]): + """ + + path: str + value: CreateResourceValue + resource_type: str + description: Union[Unset, str] = UNSET + is_oauth: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + value = self.value.to_dict() + + resource_type = self.resource_type + description = self.description + is_oauth = self.is_oauth + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "value": value, + "resource_type": resource_type, + } + ) + if description is not UNSET: + field_dict["description"] = description + if is_oauth is not UNSET: + field_dict["is_oauth"] = is_oauth + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + value = CreateResourceValue.from_dict(d.pop("value")) + + resource_type = d.pop("resource_type") + + description = d.pop("description", UNSET) + + is_oauth = d.pop("is_oauth", UNSET) + + create_resource = cls( + path=path, + value=value, + resource_type=resource_type, + description=description, + is_oauth=is_oauth, + ) + + create_resource.additional_properties = d + return create_resource + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_resource_json_body.py b/python-client/windmill-api/windmill_api/models/create_resource_json_body.py new file mode 100644 index 0000000000..2d2d6cd050 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_resource_json_body.py @@ -0,0 +1,91 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.create_resource_json_body_value import CreateResourceJsonBodyValue +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateResourceJsonBody") + + +@attr.s(auto_attribs=True) +class CreateResourceJsonBody: + """ + Attributes: + path (str): + value (CreateResourceJsonBodyValue): + resource_type (str): + description (Union[Unset, str]): + is_oauth (Union[Unset, bool]): + """ + + path: str + value: CreateResourceJsonBodyValue + resource_type: str + description: Union[Unset, str] = UNSET + is_oauth: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + value = self.value.to_dict() + + resource_type = self.resource_type + description = self.description + is_oauth = self.is_oauth + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "value": value, + "resource_type": resource_type, + } + ) + if description is not UNSET: + field_dict["description"] = description + if is_oauth is not UNSET: + field_dict["is_oauth"] = is_oauth + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + value = CreateResourceJsonBodyValue.from_dict(d.pop("value")) + + resource_type = d.pop("resource_type") + + description = d.pop("description", UNSET) + + is_oauth = d.pop("is_oauth", UNSET) + + create_resource_json_body = cls( + path=path, + value=value, + resource_type=resource_type, + description=description, + is_oauth=is_oauth, + ) + + create_resource_json_body.additional_properties = d + return create_resource_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_resource_json_body_value.py b/python-client/windmill-api/windmill_api/models/create_resource_json_body_value.py new file mode 100644 index 0000000000..ef3955a447 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_resource_json_body_value.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="CreateResourceJsonBodyValue") + + +@attr.s(auto_attribs=True) +class CreateResourceJsonBodyValue: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + create_resource_json_body_value = cls() + + create_resource_json_body_value.additional_properties = d + return create_resource_json_body_value + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_resource_type_json_body.py b/python-client/windmill-api/windmill_api/models/create_resource_type_json_body.py new file mode 100644 index 0000000000..91b541c2f5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_resource_type_json_body.py @@ -0,0 +1,83 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateResourceTypeJsonBody") + + +@attr.s(auto_attribs=True) +class CreateResourceTypeJsonBody: + """ + Attributes: + name (str): + workspace_id (Union[Unset, str]): + schema (Union[Unset, Any]): + description (Union[Unset, str]): + """ + + name: str + workspace_id: Union[Unset, str] = UNSET + schema: Union[Unset, Any] = UNSET + description: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + workspace_id = self.workspace_id + schema = self.schema + description = self.description + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if schema is not UNSET: + field_dict["schema"] = schema + if description is not UNSET: + field_dict["description"] = description + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name") + + workspace_id = d.pop("workspace_id", UNSET) + + schema = d.pop("schema", UNSET) + + description = d.pop("description", UNSET) + + create_resource_type_json_body = cls( + name=name, + workspace_id=workspace_id, + schema=schema, + description=description, + ) + + create_resource_type_json_body.additional_properties = d + return create_resource_type_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_resource_value.py b/python-client/windmill-api/windmill_api/models/create_resource_value.py new file mode 100644 index 0000000000..1b87756494 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_resource_value.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="CreateResourceValue") + + +@attr.s(auto_attribs=True) +class CreateResourceValue: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + create_resource_value = cls() + + create_resource_value.additional_properties = d + return create_resource_value + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_schedule_json_body.py b/python-client/windmill-api/windmill_api/models/create_schedule_json_body.py new file mode 100644 index 0000000000..a4c1177e62 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_schedule_json_body.py @@ -0,0 +1,105 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.create_schedule_json_body_args import CreateScheduleJsonBodyArgs +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateScheduleJsonBody") + + +@attr.s(auto_attribs=True) +class CreateScheduleJsonBody: + """ + Attributes: + path (str): + schedule (str): + script_path (str): + is_flow (bool): + args (CreateScheduleJsonBodyArgs): + offset (Union[Unset, int]): + enabled (Union[Unset, bool]): + """ + + path: str + schedule: str + script_path: str + is_flow: bool + args: CreateScheduleJsonBodyArgs + offset: Union[Unset, int] = UNSET + enabled: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + schedule = self.schedule + script_path = self.script_path + is_flow = self.is_flow + args = self.args.to_dict() + + offset = self.offset + enabled = self.enabled + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "schedule": schedule, + "script_path": script_path, + "is_flow": is_flow, + "args": args, + } + ) + if offset is not UNSET: + field_dict["offset"] = offset + if enabled is not UNSET: + field_dict["enabled"] = enabled + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + schedule = d.pop("schedule") + + script_path = d.pop("script_path") + + is_flow = d.pop("is_flow") + + args = CreateScheduleJsonBodyArgs.from_dict(d.pop("args")) + + offset = d.pop("offset", UNSET) + + enabled = d.pop("enabled", UNSET) + + create_schedule_json_body = cls( + path=path, + schedule=schedule, + script_path=script_path, + is_flow=is_flow, + args=args, + offset=offset, + enabled=enabled, + ) + + create_schedule_json_body.additional_properties = d + return create_schedule_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_schedule_json_body_args.py b/python-client/windmill-api/windmill_api/models/create_schedule_json_body_args.py new file mode 100644 index 0000000000..424802d440 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_schedule_json_body_args.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="CreateScheduleJsonBodyArgs") + + +@attr.s(auto_attribs=True) +class CreateScheduleJsonBodyArgs: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + create_schedule_json_body_args = cls() + + create_schedule_json_body_args.additional_properties = d + return create_schedule_json_body_args + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_script_json_body.py b/python-client/windmill-api/windmill_api/models/create_script_json_body.py new file mode 100644 index 0000000000..a6354075d2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_script_json_body.py @@ -0,0 +1,149 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.create_script_json_body_kind import CreateScriptJsonBodyKind +from ..models.create_script_json_body_language import CreateScriptJsonBodyLanguage +from ..models.create_script_json_body_schema import CreateScriptJsonBodySchema +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateScriptJsonBody") + + +@attr.s(auto_attribs=True) +class CreateScriptJsonBody: + """ + Attributes: + path (str): + summary (str): + description (str): + content (str): + language (CreateScriptJsonBodyLanguage): + parent_hash (Union[Unset, str]): + schema (Union[Unset, CreateScriptJsonBodySchema]): + is_template (Union[Unset, bool]): + lock (Union[Unset, List[str]]): + kind (Union[Unset, CreateScriptJsonBodyKind]): + """ + + path: str + summary: str + description: str + content: str + language: CreateScriptJsonBodyLanguage + parent_hash: Union[Unset, str] = UNSET + schema: Union[Unset, CreateScriptJsonBodySchema] = UNSET + is_template: Union[Unset, bool] = UNSET + lock: Union[Unset, List[str]] = UNSET + kind: Union[Unset, CreateScriptJsonBodyKind] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + summary = self.summary + description = self.description + content = self.content + language = self.language.value + + parent_hash = self.parent_hash + schema: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.schema, Unset): + schema = self.schema.to_dict() + + is_template = self.is_template + lock: Union[Unset, List[str]] = UNSET + if not isinstance(self.lock, Unset): + lock = self.lock + + kind: Union[Unset, str] = UNSET + if not isinstance(self.kind, Unset): + kind = self.kind.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "summary": summary, + "description": description, + "content": content, + "language": language, + } + ) + if parent_hash is not UNSET: + field_dict["parent_hash"] = parent_hash + if schema is not UNSET: + field_dict["schema"] = schema + if is_template is not UNSET: + field_dict["is_template"] = is_template + if lock is not UNSET: + field_dict["lock"] = lock + if kind is not UNSET: + field_dict["kind"] = kind + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + summary = d.pop("summary") + + description = d.pop("description") + + content = d.pop("content") + + language = CreateScriptJsonBodyLanguage(d.pop("language")) + + parent_hash = d.pop("parent_hash", UNSET) + + _schema = d.pop("schema", UNSET) + schema: Union[Unset, CreateScriptJsonBodySchema] + if isinstance(_schema, Unset): + schema = UNSET + else: + schema = CreateScriptJsonBodySchema.from_dict(_schema) + + is_template = d.pop("is_template", UNSET) + + lock = cast(List[str], d.pop("lock", UNSET)) + + _kind = d.pop("kind", UNSET) + kind: Union[Unset, CreateScriptJsonBodyKind] + if isinstance(_kind, Unset): + kind = UNSET + else: + kind = CreateScriptJsonBodyKind(_kind) + + create_script_json_body = cls( + path=path, + summary=summary, + description=description, + content=content, + language=language, + parent_hash=parent_hash, + schema=schema, + is_template=is_template, + lock=lock, + kind=kind, + ) + + create_script_json_body.additional_properties = d + return create_script_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_script_json_body_kind.py b/python-client/windmill-api/windmill_api/models/create_script_json_body_kind.py new file mode 100644 index 0000000000..5007921465 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_script_json_body_kind.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class CreateScriptJsonBodyKind(str, Enum): + SCRIPT = "script" + FAILURE = "failure" + TRIGGER = "trigger" + COMMAND = "command" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/create_script_json_body_language.py b/python-client/windmill-api/windmill_api/models/create_script_json_body_language.py new file mode 100644 index 0000000000..1a3e6339ef --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_script_json_body_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class CreateScriptJsonBodyLanguage(str, Enum): + PYTHON3 = "python3" + DENO = "deno" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/create_script_json_body_schema.py b/python-client/windmill-api/windmill_api/models/create_script_json_body_schema.py new file mode 100644 index 0000000000..2b3d32a96e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_script_json_body_schema.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="CreateScriptJsonBodySchema") + + +@attr.s(auto_attribs=True) +class CreateScriptJsonBodySchema: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + create_script_json_body_schema = cls() + + create_script_json_body_schema.additional_properties = d + return create_script_json_body_schema + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_token_json_body.py b/python-client/windmill-api/windmill_api/models/create_token_json_body.py new file mode 100644 index 0000000000..47beef4d7b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_token_json_body.py @@ -0,0 +1,74 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateTokenJsonBody") + + +@attr.s(auto_attribs=True) +class CreateTokenJsonBody: + """ + Attributes: + label (Union[Unset, str]): + expiration (Union[Unset, datetime.datetime]): + """ + + label: Union[Unset, str] = UNSET + expiration: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + label = self.label + expiration: Union[Unset, str] = UNSET + if not isinstance(self.expiration, Unset): + expiration = self.expiration.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if label is not UNSET: + field_dict["label"] = label + if expiration is not UNSET: + field_dict["expiration"] = expiration + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + label = d.pop("label", UNSET) + + _expiration = d.pop("expiration", UNSET) + expiration: Union[Unset, datetime.datetime] + if isinstance(_expiration, Unset): + expiration = UNSET + else: + expiration = isoparse(_expiration) + + create_token_json_body = cls( + label=label, + expiration=expiration, + ) + + create_token_json_body.additional_properties = d + return create_token_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_user_globally_json_body.py b/python-client/windmill-api/windmill_api/models/create_user_globally_json_body.py new file mode 100644 index 0000000000..2306b4f87a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_user_globally_json_body.py @@ -0,0 +1,89 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateUserGloballyJsonBody") + + +@attr.s(auto_attribs=True) +class CreateUserGloballyJsonBody: + """ + Attributes: + email (str): + password (str): + super_admin (bool): + name (Union[Unset, str]): + company (Union[Unset, str]): + """ + + email: str + password: str + super_admin: bool + name: Union[Unset, str] = UNSET + company: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + email = self.email + password = self.password + super_admin = self.super_admin + name = self.name + company = self.company + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "email": email, + "password": password, + "super_admin": super_admin, + } + ) + if name is not UNSET: + field_dict["name"] = name + if company is not UNSET: + field_dict["company"] = company + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + email = d.pop("email") + + password = d.pop("password") + + super_admin = d.pop("super_admin") + + name = d.pop("name", UNSET) + + company = d.pop("company", UNSET) + + create_user_globally_json_body = cls( + email=email, + password=password, + super_admin=super_admin, + name=name, + company=company, + ) + + create_user_globally_json_body.additional_properties = d + return create_user_globally_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_user_json_body.py b/python-client/windmill-api/windmill_api/models/create_user_json_body.py new file mode 100644 index 0000000000..9ecddba389 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_user_json_body.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="CreateUserJsonBody") + + +@attr.s(auto_attribs=True) +class CreateUserJsonBody: + """ + Attributes: + email (str): + username (str): + is_admin (bool): + """ + + email: str + username: str + is_admin: bool + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + email = self.email + username = self.username + is_admin = self.is_admin + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "email": email, + "username": username, + "is_admin": is_admin, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + email = d.pop("email") + + username = d.pop("username") + + is_admin = d.pop("is_admin") + + create_user_json_body = cls( + email=email, + username=username, + is_admin=is_admin, + ) + + create_user_json_body.additional_properties = d + return create_user_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_variable.py b/python-client/windmill-api/windmill_api/models/create_variable.py new file mode 100644 index 0000000000..dd58e72598 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_variable.py @@ -0,0 +1,96 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateVariable") + + +@attr.s(auto_attribs=True) +class CreateVariable: + """ + Attributes: + path (str): + value (str): + is_secret (bool): + description (str): + account (Union[Unset, int]): + is_oauth (Union[Unset, bool]): + """ + + path: str + value: str + is_secret: bool + description: str + account: Union[Unset, int] = UNSET + is_oauth: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + value = self.value + is_secret = self.is_secret + description = self.description + account = self.account + is_oauth = self.is_oauth + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "value": value, + "is_secret": is_secret, + "description": description, + } + ) + if account is not UNSET: + field_dict["account"] = account + if is_oauth is not UNSET: + field_dict["is_oauth"] = is_oauth + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + value = d.pop("value") + + is_secret = d.pop("is_secret") + + description = d.pop("description") + + account = d.pop("account", UNSET) + + is_oauth = d.pop("is_oauth", UNSET) + + create_variable = cls( + path=path, + value=value, + is_secret=is_secret, + description=description, + account=account, + is_oauth=is_oauth, + ) + + create_variable.additional_properties = d + return create_variable + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_variable_json_body.py b/python-client/windmill-api/windmill_api/models/create_variable_json_body.py new file mode 100644 index 0000000000..753bff5e88 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_variable_json_body.py @@ -0,0 +1,96 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateVariableJsonBody") + + +@attr.s(auto_attribs=True) +class CreateVariableJsonBody: + """ + Attributes: + path (str): + value (str): + is_secret (bool): + description (str): + account (Union[Unset, int]): + is_oauth (Union[Unset, bool]): + """ + + path: str + value: str + is_secret: bool + description: str + account: Union[Unset, int] = UNSET + is_oauth: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + value = self.value + is_secret = self.is_secret + description = self.description + account = self.account + is_oauth = self.is_oauth + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "value": value, + "is_secret": is_secret, + "description": description, + } + ) + if account is not UNSET: + field_dict["account"] = account + if is_oauth is not UNSET: + field_dict["is_oauth"] = is_oauth + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + value = d.pop("value") + + is_secret = d.pop("is_secret") + + description = d.pop("description") + + account = d.pop("account", UNSET) + + is_oauth = d.pop("is_oauth", UNSET) + + create_variable_json_body = cls( + path=path, + value=value, + is_secret=is_secret, + description=description, + account=account, + is_oauth=is_oauth, + ) + + create_variable_json_body.additional_properties = d + return create_variable_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_workspace.py b/python-client/windmill-api/windmill_api/models/create_workspace.py new file mode 100644 index 0000000000..dc5da47a2f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_workspace.py @@ -0,0 +1,78 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="CreateWorkspace") + + +@attr.s(auto_attribs=True) +class CreateWorkspace: + """ + Attributes: + id (str): + name (str): + username (str): + domain (str): + """ + + id: str + name: str + username: str + domain: str + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + name = self.name + username = self.username + domain = self.domain + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "username": username, + "domain": domain, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id") + + name = d.pop("name") + + username = d.pop("username") + + domain = d.pop("domain") + + create_workspace = cls( + id=id, + name=name, + username=username, + domain=domain, + ) + + create_workspace.additional_properties = d + return create_workspace + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/create_workspace_json_body.py b/python-client/windmill-api/windmill_api/models/create_workspace_json_body.py new file mode 100644 index 0000000000..1f9dfc07ea --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/create_workspace_json_body.py @@ -0,0 +1,78 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="CreateWorkspaceJsonBody") + + +@attr.s(auto_attribs=True) +class CreateWorkspaceJsonBody: + """ + Attributes: + id (str): + name (str): + username (str): + domain (str): + """ + + id: str + name: str + username: str + domain: str + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + name = self.name + username = self.username + domain = self.domain + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "username": username, + "domain": domain, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id") + + name = d.pop("name") + + username = d.pop("username") + + domain = d.pop("domain") + + create_workspace_json_body = cls( + id=id, + name=name, + username=username, + domain=domain, + ) + + create_workspace_json_body.additional_properties = d + return create_workspace_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/decline_invite_json_body.py b/python-client/windmill-api/windmill_api/models/decline_invite_json_body.py new file mode 100644 index 0000000000..e82dd61f1c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/decline_invite_json_body.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="DeclineInviteJsonBody") + + +@attr.s(auto_attribs=True) +class DeclineInviteJsonBody: + """ + Attributes: + workspace_id (str): + """ + + workspace_id: str + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + workspace_id = self.workspace_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "workspace_id": workspace_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + workspace_id = d.pop("workspace_id") + + decline_invite_json_body = cls( + workspace_id=workspace_id, + ) + + decline_invite_json_body.additional_properties = d + return decline_invite_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200.py new file mode 100644 index 0000000000..f07c99d7cf --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200.py @@ -0,0 +1,300 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.delete_completed_job_response_200_args import DeleteCompletedJobResponse200Args +from ..models.delete_completed_job_response_200_flow_status import DeleteCompletedJobResponse200FlowStatus +from ..models.delete_completed_job_response_200_job_kind import DeleteCompletedJobResponse200JobKind +from ..models.delete_completed_job_response_200_language import DeleteCompletedJobResponse200Language +from ..models.delete_completed_job_response_200_raw_flow import DeleteCompletedJobResponse200RawFlow +from ..models.delete_completed_job_response_200_result import DeleteCompletedJobResponse200Result +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200: + """ + Attributes: + id (str): + created_by (str): + created_at (datetime.datetime): + started_at (datetime.datetime): + duration_ms (int): + success (bool): + canceled (bool): + job_kind (DeleteCompletedJobResponse200JobKind): + permissioned_as (str): The user (u/userfoo) or group (g/groupfoo) whom + the execution of this script will be permissioned_as and by extension its DT_TOKEN. + is_flow_step (bool): + is_skipped (bool): + workspace_id (Union[Unset, str]): + parent_job (Union[Unset, str]): + script_path (Union[Unset, str]): + script_hash (Union[Unset, str]): + args (Union[Unset, DeleteCompletedJobResponse200Args]): + result (Union[Unset, DeleteCompletedJobResponse200Result]): + logs (Union[Unset, str]): + deleted (Union[Unset, bool]): + raw_code (Union[Unset, str]): + canceled_by (Union[Unset, str]): + canceled_reason (Union[Unset, str]): + schedule_path (Union[Unset, str]): + flow_status (Union[Unset, DeleteCompletedJobResponse200FlowStatus]): + raw_flow (Union[Unset, DeleteCompletedJobResponse200RawFlow]): + language (Union[Unset, DeleteCompletedJobResponse200Language]): + """ + + id: str + created_by: str + created_at: datetime.datetime + started_at: datetime.datetime + duration_ms: int + success: bool + canceled: bool + job_kind: DeleteCompletedJobResponse200JobKind + permissioned_as: str + is_flow_step: bool + is_skipped: bool + workspace_id: Union[Unset, str] = UNSET + parent_job: Union[Unset, str] = UNSET + script_path: Union[Unset, str] = UNSET + script_hash: Union[Unset, str] = UNSET + args: Union[Unset, DeleteCompletedJobResponse200Args] = UNSET + result: Union[Unset, DeleteCompletedJobResponse200Result] = UNSET + logs: Union[Unset, str] = UNSET + deleted: Union[Unset, bool] = UNSET + raw_code: Union[Unset, str] = UNSET + canceled_by: Union[Unset, str] = UNSET + canceled_reason: Union[Unset, str] = UNSET + schedule_path: Union[Unset, str] = UNSET + flow_status: Union[Unset, DeleteCompletedJobResponse200FlowStatus] = UNSET + raw_flow: Union[Unset, DeleteCompletedJobResponse200RawFlow] = UNSET + language: Union[Unset, DeleteCompletedJobResponse200Language] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + created_by = self.created_by + created_at = self.created_at.isoformat() + + started_at = self.started_at.isoformat() + + duration_ms = self.duration_ms + success = self.success + canceled = self.canceled + job_kind = self.job_kind.value + + permissioned_as = self.permissioned_as + is_flow_step = self.is_flow_step + is_skipped = self.is_skipped + workspace_id = self.workspace_id + parent_job = self.parent_job + script_path = self.script_path + script_hash = self.script_hash + args: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.args, Unset): + args = self.args.to_dict() + + result: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.result, Unset): + result = self.result.to_dict() + + logs = self.logs + deleted = self.deleted + raw_code = self.raw_code + canceled_by = self.canceled_by + canceled_reason = self.canceled_reason + schedule_path = self.schedule_path + flow_status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.flow_status, Unset): + flow_status = self.flow_status.to_dict() + + raw_flow: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.raw_flow, Unset): + raw_flow = self.raw_flow.to_dict() + + language: Union[Unset, str] = UNSET + if not isinstance(self.language, Unset): + language = self.language.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "created_by": created_by, + "created_at": created_at, + "started_at": started_at, + "duration_ms": duration_ms, + "success": success, + "canceled": canceled, + "job_kind": job_kind, + "permissioned_as": permissioned_as, + "is_flow_step": is_flow_step, + "is_skipped": is_skipped, + } + ) + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if parent_job is not UNSET: + field_dict["parent_job"] = parent_job + if script_path is not UNSET: + field_dict["script_path"] = script_path + if script_hash is not UNSET: + field_dict["script_hash"] = script_hash + if args is not UNSET: + field_dict["args"] = args + if result is not UNSET: + field_dict["result"] = result + if logs is not UNSET: + field_dict["logs"] = logs + if deleted is not UNSET: + field_dict["deleted"] = deleted + if raw_code is not UNSET: + field_dict["raw_code"] = raw_code + if canceled_by is not UNSET: + field_dict["canceled_by"] = canceled_by + if canceled_reason is not UNSET: + field_dict["canceled_reason"] = canceled_reason + if schedule_path is not UNSET: + field_dict["schedule_path"] = schedule_path + if flow_status is not UNSET: + field_dict["flow_status"] = flow_status + if raw_flow is not UNSET: + field_dict["raw_flow"] = raw_flow + if language is not UNSET: + field_dict["language"] = language + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id") + + created_by = d.pop("created_by") + + created_at = isoparse(d.pop("created_at")) + + started_at = isoparse(d.pop("started_at")) + + duration_ms = d.pop("duration_ms") + + success = d.pop("success") + + canceled = d.pop("canceled") + + job_kind = DeleteCompletedJobResponse200JobKind(d.pop("job_kind")) + + permissioned_as = d.pop("permissioned_as") + + is_flow_step = d.pop("is_flow_step") + + is_skipped = d.pop("is_skipped") + + workspace_id = d.pop("workspace_id", UNSET) + + parent_job = d.pop("parent_job", UNSET) + + script_path = d.pop("script_path", UNSET) + + script_hash = d.pop("script_hash", UNSET) + + _args = d.pop("args", UNSET) + args: Union[Unset, DeleteCompletedJobResponse200Args] + if isinstance(_args, Unset): + args = UNSET + else: + args = DeleteCompletedJobResponse200Args.from_dict(_args) + + _result = d.pop("result", UNSET) + result: Union[Unset, DeleteCompletedJobResponse200Result] + if isinstance(_result, Unset): + result = UNSET + else: + result = DeleteCompletedJobResponse200Result.from_dict(_result) + + logs = d.pop("logs", UNSET) + + deleted = d.pop("deleted", UNSET) + + raw_code = d.pop("raw_code", UNSET) + + canceled_by = d.pop("canceled_by", UNSET) + + canceled_reason = d.pop("canceled_reason", UNSET) + + schedule_path = d.pop("schedule_path", UNSET) + + _flow_status = d.pop("flow_status", UNSET) + flow_status: Union[Unset, DeleteCompletedJobResponse200FlowStatus] + if isinstance(_flow_status, Unset): + flow_status = UNSET + else: + flow_status = DeleteCompletedJobResponse200FlowStatus.from_dict(_flow_status) + + _raw_flow = d.pop("raw_flow", UNSET) + raw_flow: Union[Unset, DeleteCompletedJobResponse200RawFlow] + if isinstance(_raw_flow, Unset): + raw_flow = UNSET + else: + raw_flow = DeleteCompletedJobResponse200RawFlow.from_dict(_raw_flow) + + _language = d.pop("language", UNSET) + language: Union[Unset, DeleteCompletedJobResponse200Language] + if isinstance(_language, Unset): + language = UNSET + else: + language = DeleteCompletedJobResponse200Language(_language) + + delete_completed_job_response_200 = cls( + id=id, + created_by=created_by, + created_at=created_at, + started_at=started_at, + duration_ms=duration_ms, + success=success, + canceled=canceled, + job_kind=job_kind, + permissioned_as=permissioned_as, + is_flow_step=is_flow_step, + is_skipped=is_skipped, + workspace_id=workspace_id, + parent_job=parent_job, + script_path=script_path, + script_hash=script_hash, + args=args, + result=result, + logs=logs, + deleted=deleted, + raw_code=raw_code, + canceled_by=canceled_by, + canceled_reason=canceled_reason, + schedule_path=schedule_path, + flow_status=flow_status, + raw_flow=raw_flow, + language=language, + ) + + delete_completed_job_response_200.additional_properties = d + return delete_completed_job_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_args.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_args.py new file mode 100644 index 0000000000..69d8f2834c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_args.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="DeleteCompletedJobResponse200Args") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200Args: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + delete_completed_job_response_200_args = cls() + + delete_completed_job_response_200_args.additional_properties = d + return delete_completed_job_response_200_args + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status.py new file mode 100644 index 0000000000..45623ac17b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status.py @@ -0,0 +1,106 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.delete_completed_job_response_200_flow_status_failure_module import ( + DeleteCompletedJobResponse200FlowStatusFailureModule, +) +from ..models.delete_completed_job_response_200_flow_status_modules_item import ( + DeleteCompletedJobResponse200FlowStatusModulesItem, +) +from ..models.delete_completed_job_response_200_flow_status_retry import DeleteCompletedJobResponse200FlowStatusRetry +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200FlowStatus") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200FlowStatus: + """ + Attributes: + step (int): + modules (List[DeleteCompletedJobResponse200FlowStatusModulesItem]): + failure_module (DeleteCompletedJobResponse200FlowStatusFailureModule): + retry (Union[Unset, DeleteCompletedJobResponse200FlowStatusRetry]): + """ + + step: int + modules: List[DeleteCompletedJobResponse200FlowStatusModulesItem] + failure_module: DeleteCompletedJobResponse200FlowStatusFailureModule + retry: Union[Unset, DeleteCompletedJobResponse200FlowStatusRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + step = self.step + modules = [] + for modules_item_data in self.modules: + modules_item = modules_item_data.to_dict() + + modules.append(modules_item) + + failure_module = self.failure_module.to_dict() + + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "step": step, + "modules": modules, + "failure_module": failure_module, + } + ) + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + step = d.pop("step") + + modules = [] + _modules = d.pop("modules") + for modules_item_data in _modules: + modules_item = DeleteCompletedJobResponse200FlowStatusModulesItem.from_dict(modules_item_data) + + modules.append(modules_item) + + failure_module = DeleteCompletedJobResponse200FlowStatusFailureModule.from_dict(d.pop("failure_module")) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, DeleteCompletedJobResponse200FlowStatusRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = DeleteCompletedJobResponse200FlowStatusRetry.from_dict(_retry) + + delete_completed_job_response_200_flow_status = cls( + step=step, + modules=modules, + failure_module=failure_module, + retry=retry, + ) + + delete_completed_job_response_200_flow_status.additional_properties = d + return delete_completed_job_response_200_flow_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_failure_module.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_failure_module.py new file mode 100644 index 0000000000..2593bc1777 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_failure_module.py @@ -0,0 +1,108 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.delete_completed_job_response_200_flow_status_failure_module_iterator import ( + DeleteCompletedJobResponse200FlowStatusFailureModuleIterator, +) +from ..models.delete_completed_job_response_200_flow_status_failure_module_type import ( + DeleteCompletedJobResponse200FlowStatusFailureModuleType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200FlowStatusFailureModule") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200FlowStatusFailureModule: + """ + Attributes: + type (DeleteCompletedJobResponse200FlowStatusFailureModuleType): + job (Union[Unset, str]): + count (Union[Unset, int]): + iterator (Union[Unset, DeleteCompletedJobResponse200FlowStatusFailureModuleIterator]): + forloop_jobs (Union[Unset, List[str]]): + """ + + type: DeleteCompletedJobResponse200FlowStatusFailureModuleType + job: Union[Unset, str] = UNSET + count: Union[Unset, int] = UNSET + iterator: Union[Unset, DeleteCompletedJobResponse200FlowStatusFailureModuleIterator] = UNSET + forloop_jobs: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + job = self.job + count = self.count + iterator: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.iterator, Unset): + iterator = self.iterator.to_dict() + + forloop_jobs: Union[Unset, List[str]] = UNSET + if not isinstance(self.forloop_jobs, Unset): + forloop_jobs = self.forloop_jobs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if job is not UNSET: + field_dict["job"] = job + if count is not UNSET: + field_dict["count"] = count + if iterator is not UNSET: + field_dict["iterator"] = iterator + if forloop_jobs is not UNSET: + field_dict["forloop_jobs"] = forloop_jobs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = DeleteCompletedJobResponse200FlowStatusFailureModuleType(d.pop("type")) + + job = d.pop("job", UNSET) + + count = d.pop("count", UNSET) + + _iterator = d.pop("iterator", UNSET) + iterator: Union[Unset, DeleteCompletedJobResponse200FlowStatusFailureModuleIterator] + if isinstance(_iterator, Unset): + iterator = UNSET + else: + iterator = DeleteCompletedJobResponse200FlowStatusFailureModuleIterator.from_dict(_iterator) + + forloop_jobs = cast(List[str], d.pop("forloop_jobs", UNSET)) + + delete_completed_job_response_200_flow_status_failure_module = cls( + type=type, + job=job, + count=count, + iterator=iterator, + forloop_jobs=forloop_jobs, + ) + + delete_completed_job_response_200_flow_status_failure_module.additional_properties = d + return delete_completed_job_response_200_flow_status_failure_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_failure_module_iterator.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_failure_module_iterator.py new file mode 100644 index 0000000000..c69eb8b0ec --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_failure_module_iterator.py @@ -0,0 +1,76 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200FlowStatusFailureModuleIterator") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200FlowStatusFailureModuleIterator: + """ + Attributes: + index (Union[Unset, int]): + itered (Union[Unset, List[Any]]): + args (Union[Unset, Any]): + """ + + index: Union[Unset, int] = UNSET + itered: Union[Unset, List[Any]] = UNSET + args: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + index = self.index + itered: Union[Unset, List[Any]] = UNSET + if not isinstance(self.itered, Unset): + itered = self.itered + + args = self.args + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if index is not UNSET: + field_dict["index"] = index + if itered is not UNSET: + field_dict["itered"] = itered + if args is not UNSET: + field_dict["args"] = args + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + index = d.pop("index", UNSET) + + itered = cast(List[Any], d.pop("itered", UNSET)) + + args = d.pop("args", UNSET) + + delete_completed_job_response_200_flow_status_failure_module_iterator = cls( + index=index, + itered=itered, + args=args, + ) + + delete_completed_job_response_200_flow_status_failure_module_iterator.additional_properties = d + return delete_completed_job_response_200_flow_status_failure_module_iterator + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_failure_module_type.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_failure_module_type.py new file mode 100644 index 0000000000..afbdd596d6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_failure_module_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200FlowStatusFailureModuleType(str, Enum): + WAITINGFORPRIORSTEPS = "WaitingForPriorSteps" + WAITINGFOREVENT = "WaitingForEvent" + WAITINGFOREXECUTOR = "WaitingForExecutor" + INPROGRESS = "InProgress" + SUCCESS = "Success" + FAILURE = "Failure" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_modules_item.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_modules_item.py new file mode 100644 index 0000000000..5432c869d7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_modules_item.py @@ -0,0 +1,108 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.delete_completed_job_response_200_flow_status_modules_item_iterator import ( + DeleteCompletedJobResponse200FlowStatusModulesItemIterator, +) +from ..models.delete_completed_job_response_200_flow_status_modules_item_type import ( + DeleteCompletedJobResponse200FlowStatusModulesItemType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200FlowStatusModulesItem") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200FlowStatusModulesItem: + """ + Attributes: + type (DeleteCompletedJobResponse200FlowStatusModulesItemType): + job (Union[Unset, str]): + count (Union[Unset, int]): + iterator (Union[Unset, DeleteCompletedJobResponse200FlowStatusModulesItemIterator]): + forloop_jobs (Union[Unset, List[str]]): + """ + + type: DeleteCompletedJobResponse200FlowStatusModulesItemType + job: Union[Unset, str] = UNSET + count: Union[Unset, int] = UNSET + iterator: Union[Unset, DeleteCompletedJobResponse200FlowStatusModulesItemIterator] = UNSET + forloop_jobs: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + job = self.job + count = self.count + iterator: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.iterator, Unset): + iterator = self.iterator.to_dict() + + forloop_jobs: Union[Unset, List[str]] = UNSET + if not isinstance(self.forloop_jobs, Unset): + forloop_jobs = self.forloop_jobs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if job is not UNSET: + field_dict["job"] = job + if count is not UNSET: + field_dict["count"] = count + if iterator is not UNSET: + field_dict["iterator"] = iterator + if forloop_jobs is not UNSET: + field_dict["forloop_jobs"] = forloop_jobs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = DeleteCompletedJobResponse200FlowStatusModulesItemType(d.pop("type")) + + job = d.pop("job", UNSET) + + count = d.pop("count", UNSET) + + _iterator = d.pop("iterator", UNSET) + iterator: Union[Unset, DeleteCompletedJobResponse200FlowStatusModulesItemIterator] + if isinstance(_iterator, Unset): + iterator = UNSET + else: + iterator = DeleteCompletedJobResponse200FlowStatusModulesItemIterator.from_dict(_iterator) + + forloop_jobs = cast(List[str], d.pop("forloop_jobs", UNSET)) + + delete_completed_job_response_200_flow_status_modules_item = cls( + type=type, + job=job, + count=count, + iterator=iterator, + forloop_jobs=forloop_jobs, + ) + + delete_completed_job_response_200_flow_status_modules_item.additional_properties = d + return delete_completed_job_response_200_flow_status_modules_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_modules_item_iterator.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_modules_item_iterator.py new file mode 100644 index 0000000000..2840ac7e7c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_modules_item_iterator.py @@ -0,0 +1,76 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200FlowStatusModulesItemIterator") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200FlowStatusModulesItemIterator: + """ + Attributes: + index (Union[Unset, int]): + itered (Union[Unset, List[Any]]): + args (Union[Unset, Any]): + """ + + index: Union[Unset, int] = UNSET + itered: Union[Unset, List[Any]] = UNSET + args: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + index = self.index + itered: Union[Unset, List[Any]] = UNSET + if not isinstance(self.itered, Unset): + itered = self.itered + + args = self.args + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if index is not UNSET: + field_dict["index"] = index + if itered is not UNSET: + field_dict["itered"] = itered + if args is not UNSET: + field_dict["args"] = args + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + index = d.pop("index", UNSET) + + itered = cast(List[Any], d.pop("itered", UNSET)) + + args = d.pop("args", UNSET) + + delete_completed_job_response_200_flow_status_modules_item_iterator = cls( + index=index, + itered=itered, + args=args, + ) + + delete_completed_job_response_200_flow_status_modules_item_iterator.additional_properties = d + return delete_completed_job_response_200_flow_status_modules_item_iterator + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_modules_item_type.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_modules_item_type.py new file mode 100644 index 0000000000..f929bb966f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_modules_item_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200FlowStatusModulesItemType(str, Enum): + WAITINGFORPRIORSTEPS = "WaitingForPriorSteps" + WAITINGFOREVENT = "WaitingForEvent" + WAITINGFOREXECUTOR = "WaitingForExecutor" + INPROGRESS = "InProgress" + SUCCESS = "Success" + FAILURE = "Failure" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_retry.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_retry.py new file mode 100644 index 0000000000..7b1069ebba --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_flow_status_retry.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200FlowStatusRetry") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200FlowStatusRetry: + """ + Attributes: + fail_count (Union[Unset, int]): + """ + + fail_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + fail_count = self.fail_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if fail_count is not UNSET: + field_dict["fail_count"] = fail_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + fail_count = d.pop("fail_count", UNSET) + + delete_completed_job_response_200_flow_status_retry = cls( + fail_count=fail_count, + ) + + delete_completed_job_response_200_flow_status_retry.additional_properties = d + return delete_completed_job_response_200_flow_status_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_job_kind.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_job_kind.py new file mode 100644 index 0000000000..832b47766c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_job_kind.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200JobKind(str, Enum): + SCRIPT = "script" + PREVIEW = "preview" + DEPENDENCIES = "dependencies" + FLOW = "flow" + FLOWPREVIEW = "flowpreview" + SCRIPT_HUB = "script_hub" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_language.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_language.py new file mode 100644 index 0000000000..73dc43cf60 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200Language(str, Enum): + PYTHON3 = "python3" + DENO = "deno" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow.py new file mode 100644 index 0000000000..522de5d706 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow.py @@ -0,0 +1,99 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_failure_module import ( + DeleteCompletedJobResponse200RawFlowFailureModule, +) +from ..models.delete_completed_job_response_200_raw_flow_modules_item import ( + DeleteCompletedJobResponse200RawFlowModulesItem, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlow") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlow: + """ + Attributes: + modules (List[DeleteCompletedJobResponse200RawFlowModulesItem]): + failure_module (Union[Unset, DeleteCompletedJobResponse200RawFlowFailureModule]): + same_worker (Union[Unset, bool]): + """ + + modules: List[DeleteCompletedJobResponse200RawFlowModulesItem] + failure_module: Union[Unset, DeleteCompletedJobResponse200RawFlowFailureModule] = UNSET + same_worker: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + modules = [] + for modules_item_data in self.modules: + modules_item = modules_item_data.to_dict() + + modules.append(modules_item) + + failure_module: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.failure_module, Unset): + failure_module = self.failure_module.to_dict() + + same_worker = self.same_worker + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "modules": modules, + } + ) + if failure_module is not UNSET: + field_dict["failure_module"] = failure_module + if same_worker is not UNSET: + field_dict["same_worker"] = same_worker + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + modules = [] + _modules = d.pop("modules") + for modules_item_data in _modules: + modules_item = DeleteCompletedJobResponse200RawFlowModulesItem.from_dict(modules_item_data) + + modules.append(modules_item) + + _failure_module = d.pop("failure_module", UNSET) + failure_module: Union[Unset, DeleteCompletedJobResponse200RawFlowFailureModule] + if isinstance(_failure_module, Unset): + failure_module = UNSET + else: + failure_module = DeleteCompletedJobResponse200RawFlowFailureModule.from_dict(_failure_module) + + same_worker = d.pop("same_worker", UNSET) + + delete_completed_job_response_200_raw_flow = cls( + modules=modules, + failure_module=failure_module, + same_worker=same_worker, + ) + + delete_completed_job_response_200_raw_flow.additional_properties = d + return delete_completed_job_response_200_raw_flow + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module.py new file mode 100644 index 0000000000..4a1e9a944c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module.py @@ -0,0 +1,259 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_failure_module_input_transforms import ( + DeleteCompletedJobResponse200RawFlowFailureModuleInputTransforms, +) +from ..models.delete_completed_job_response_200_raw_flow_failure_module_retry import ( + DeleteCompletedJobResponse200RawFlowFailureModuleRetry, +) +from ..models.delete_completed_job_response_200_raw_flow_failure_module_sleep_type_0 import ( + DeleteCompletedJobResponse200RawFlowFailureModuleSleepType0, +) +from ..models.delete_completed_job_response_200_raw_flow_failure_module_sleep_type_1 import ( + DeleteCompletedJobResponse200RawFlowFailureModuleSleepType1, +) +from ..models.delete_completed_job_response_200_raw_flow_failure_module_stop_after_if import ( + DeleteCompletedJobResponse200RawFlowFailureModuleStopAfterIf, +) +from ..models.delete_completed_job_response_200_raw_flow_failure_module_value_type_0 import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType0, +) +from ..models.delete_completed_job_response_200_raw_flow_failure_module_value_type_1 import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType1, +) +from ..models.delete_completed_job_response_200_raw_flow_failure_module_value_type_2 import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType2, +) +from ..models.delete_completed_job_response_200_raw_flow_failure_module_value_type_3 import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType3, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowFailureModule") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowFailureModule: + """ + Attributes: + input_transforms (DeleteCompletedJobResponse200RawFlowFailureModuleInputTransforms): + value (Union[DeleteCompletedJobResponse200RawFlowFailureModuleValueType0, + DeleteCompletedJobResponse200RawFlowFailureModuleValueType1, + DeleteCompletedJobResponse200RawFlowFailureModuleValueType2, + DeleteCompletedJobResponse200RawFlowFailureModuleValueType3]): + stop_after_if (Union[Unset, DeleteCompletedJobResponse200RawFlowFailureModuleStopAfterIf]): + sleep (Union[DeleteCompletedJobResponse200RawFlowFailureModuleSleepType0, + DeleteCompletedJobResponse200RawFlowFailureModuleSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, DeleteCompletedJobResponse200RawFlowFailureModuleRetry]): + """ + + input_transforms: DeleteCompletedJobResponse200RawFlowFailureModuleInputTransforms + value: Union[ + DeleteCompletedJobResponse200RawFlowFailureModuleValueType0, + DeleteCompletedJobResponse200RawFlowFailureModuleValueType1, + DeleteCompletedJobResponse200RawFlowFailureModuleValueType2, + DeleteCompletedJobResponse200RawFlowFailureModuleValueType3, + ] + stop_after_if: Union[Unset, DeleteCompletedJobResponse200RawFlowFailureModuleStopAfterIf] = UNSET + sleep: Union[ + DeleteCompletedJobResponse200RawFlowFailureModuleSleepType0, + DeleteCompletedJobResponse200RawFlowFailureModuleSleepType1, + Unset, + ] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, DeleteCompletedJobResponse200RawFlowFailureModuleRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, DeleteCompletedJobResponse200RawFlowFailureModuleValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, DeleteCompletedJobResponse200RawFlowFailureModuleValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, DeleteCompletedJobResponse200RawFlowFailureModuleValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, DeleteCompletedJobResponse200RawFlowFailureModuleSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = DeleteCompletedJobResponse200RawFlowFailureModuleInputTransforms.from_dict( + d.pop("input_transforms") + ) + + def _parse_value( + data: object, + ) -> Union[ + DeleteCompletedJobResponse200RawFlowFailureModuleValueType0, + DeleteCompletedJobResponse200RawFlowFailureModuleValueType1, + DeleteCompletedJobResponse200RawFlowFailureModuleValueType2, + DeleteCompletedJobResponse200RawFlowFailureModuleValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = DeleteCompletedJobResponse200RawFlowFailureModuleValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = DeleteCompletedJobResponse200RawFlowFailureModuleValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = DeleteCompletedJobResponse200RawFlowFailureModuleValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = DeleteCompletedJobResponse200RawFlowFailureModuleValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, DeleteCompletedJobResponse200RawFlowFailureModuleStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = DeleteCompletedJobResponse200RawFlowFailureModuleStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[ + DeleteCompletedJobResponse200RawFlowFailureModuleSleepType0, + DeleteCompletedJobResponse200RawFlowFailureModuleSleepType1, + Unset, + ]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, DeleteCompletedJobResponse200RawFlowFailureModuleSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = DeleteCompletedJobResponse200RawFlowFailureModuleSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, DeleteCompletedJobResponse200RawFlowFailureModuleSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = DeleteCompletedJobResponse200RawFlowFailureModuleSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, DeleteCompletedJobResponse200RawFlowFailureModuleRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = DeleteCompletedJobResponse200RawFlowFailureModuleRetry.from_dict(_retry) + + delete_completed_job_response_200_raw_flow_failure_module = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + delete_completed_job_response_200_raw_flow_failure_module.additional_properties = d + return delete_completed_job_response_200_raw_flow_failure_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_input_transforms.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_input_transforms.py new file mode 100644 index 0000000000..430698ac4e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_input_transforms.py @@ -0,0 +1,113 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0 import ( + DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0, +) +from ..models.delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1 import ( + DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowFailureModuleInputTransforms") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowFailureModuleInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0, + DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance( + prop, DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0 + ): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + delete_completed_job_response_200_raw_flow_failure_module_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0, + DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0.from_dict( + data + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1.from_dict( + data + ) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + delete_completed_job_response_200_raw_flow_failure_module_input_transforms.additional_properties = ( + additional_properties + ) + return delete_completed_job_response_200_raw_flow_failure_module_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0, + DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0, + DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..379eb1f3ff --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0.py @@ -0,0 +1,75 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0_type import ( + DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0Type( + d.pop("type") + ) + + value = d.pop("value", UNSET) + + delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0.additional_properties = ( + d + ) + return delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..2b30fe146f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..c86d7e398a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1.py @@ -0,0 +1,72 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1_type import ( + DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1Type( + d.pop("type") + ) + + delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1.additional_properties = ( + d + ) + return delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..e033a68945 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_retry.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_retry.py new file mode 100644 index 0000000000..b1412f4c61 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_retry.py @@ -0,0 +1,86 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_failure_module_retry_constant import ( + DeleteCompletedJobResponse200RawFlowFailureModuleRetryConstant, +) +from ..models.delete_completed_job_response_200_raw_flow_failure_module_retry_exponential import ( + DeleteCompletedJobResponse200RawFlowFailureModuleRetryExponential, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowFailureModuleRetry") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowFailureModuleRetry: + """ + Attributes: + constant (Union[Unset, DeleteCompletedJobResponse200RawFlowFailureModuleRetryConstant]): + exponential (Union[Unset, DeleteCompletedJobResponse200RawFlowFailureModuleRetryExponential]): + """ + + constant: Union[Unset, DeleteCompletedJobResponse200RawFlowFailureModuleRetryConstant] = UNSET + exponential: Union[Unset, DeleteCompletedJobResponse200RawFlowFailureModuleRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, DeleteCompletedJobResponse200RawFlowFailureModuleRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = DeleteCompletedJobResponse200RawFlowFailureModuleRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, DeleteCompletedJobResponse200RawFlowFailureModuleRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = DeleteCompletedJobResponse200RawFlowFailureModuleRetryExponential.from_dict(_exponential) + + delete_completed_job_response_200_raw_flow_failure_module_retry = cls( + constant=constant, + exponential=exponential, + ) + + delete_completed_job_response_200_raw_flow_failure_module_retry.additional_properties = d + return delete_completed_job_response_200_raw_flow_failure_module_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_retry_constant.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_retry_constant.py new file mode 100644 index 0000000000..0001b43c6c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowFailureModuleRetryConstant") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowFailureModuleRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + delete_completed_job_response_200_raw_flow_failure_module_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + delete_completed_job_response_200_raw_flow_failure_module_retry_constant.additional_properties = d + return delete_completed_job_response_200_raw_flow_failure_module_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_retry_exponential.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_retry_exponential.py new file mode 100644 index 0000000000..125c09d15b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowFailureModuleRetryExponential") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowFailureModuleRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + delete_completed_job_response_200_raw_flow_failure_module_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + delete_completed_job_response_200_raw_flow_failure_module_retry_exponential.additional_properties = d + return delete_completed_job_response_200_raw_flow_failure_module_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_sleep_type_0.py new file mode 100644 index 0000000000..3847f17ff4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_sleep_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_failure_module_sleep_type_0_type import ( + DeleteCompletedJobResponse200RawFlowFailureModuleSleepType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowFailureModuleSleepType0") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowFailureModuleSleepType0: + """ + Attributes: + type (DeleteCompletedJobResponse200RawFlowFailureModuleSleepType0Type): + value (Union[Unset, Any]): + """ + + type: DeleteCompletedJobResponse200RawFlowFailureModuleSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = DeleteCompletedJobResponse200RawFlowFailureModuleSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + delete_completed_job_response_200_raw_flow_failure_module_sleep_type_0 = cls( + type=type, + value=value, + ) + + delete_completed_job_response_200_raw_flow_failure_module_sleep_type_0.additional_properties = d + return delete_completed_job_response_200_raw_flow_failure_module_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_sleep_type_0_type.py new file mode 100644 index 0000000000..1508f6b7ea --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200RawFlowFailureModuleSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_sleep_type_1.py new file mode 100644 index 0000000000..f1144b08f4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_sleep_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_failure_module_sleep_type_1_type import ( + DeleteCompletedJobResponse200RawFlowFailureModuleSleepType1Type, +) + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowFailureModuleSleepType1") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowFailureModuleSleepType1: + """ + Attributes: + expr (str): + type (DeleteCompletedJobResponse200RawFlowFailureModuleSleepType1Type): + """ + + expr: str + type: DeleteCompletedJobResponse200RawFlowFailureModuleSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = DeleteCompletedJobResponse200RawFlowFailureModuleSleepType1Type(d.pop("type")) + + delete_completed_job_response_200_raw_flow_failure_module_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + delete_completed_job_response_200_raw_flow_failure_module_sleep_type_1.additional_properties = d + return delete_completed_job_response_200_raw_flow_failure_module_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_sleep_type_1_type.py new file mode 100644 index 0000000000..b8833c85d9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200RawFlowFailureModuleSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_stop_after_if.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_stop_after_if.py new file mode 100644 index 0000000000..5c4ab7c3b7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowFailureModuleStopAfterIf") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowFailureModuleStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + delete_completed_job_response_200_raw_flow_failure_module_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + delete_completed_job_response_200_raw_flow_failure_module_stop_after_if.additional_properties = d + return delete_completed_job_response_200_raw_flow_failure_module_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_0.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_0.py new file mode 100644 index 0000000000..76c7af7011 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_failure_module_value_type_0_language import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowFailureModuleValueType0") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowFailureModuleValueType0: + """ + Attributes: + content (str): + language (DeleteCompletedJobResponse200RawFlowFailureModuleValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: DeleteCompletedJobResponse200RawFlowFailureModuleValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = DeleteCompletedJobResponse200RawFlowFailureModuleValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + delete_completed_job_response_200_raw_flow_failure_module_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + delete_completed_job_response_200_raw_flow_failure_module_value_type_0.additional_properties = d + return delete_completed_job_response_200_raw_flow_failure_module_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_0_language.py new file mode 100644 index 0000000000..e2f12426c2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200RawFlowFailureModuleValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_1.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_1.py new file mode 100644 index 0000000000..f86822ec6d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_failure_module_value_type_1_type import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType1Type, +) + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowFailureModuleValueType1") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowFailureModuleValueType1: + """ + Attributes: + path (str): + type (DeleteCompletedJobResponse200RawFlowFailureModuleValueType1Type): + """ + + path: str + type: DeleteCompletedJobResponse200RawFlowFailureModuleValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = DeleteCompletedJobResponse200RawFlowFailureModuleValueType1Type(d.pop("type")) + + delete_completed_job_response_200_raw_flow_failure_module_value_type_1 = cls( + path=path, + type=type, + ) + + delete_completed_job_response_200_raw_flow_failure_module_value_type_1.additional_properties = d + return delete_completed_job_response_200_raw_flow_failure_module_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_1_type.py new file mode 100644 index 0000000000..2fab0ab9f6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200RawFlowFailureModuleValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2.py new file mode 100644 index 0000000000..7475711514 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2.py @@ -0,0 +1,114 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0 import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0, +) +from ..models.delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1 import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1, +) +from ..models.delete_completed_job_response_200_raw_flow_failure_module_value_type_2_type import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType2Type, +) + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowFailureModuleValueType2") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowFailureModuleValueType2: + """ + Attributes: + iterator (Union[DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0, + DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1]): + skip_failures (bool): + type (DeleteCompletedJobResponse200RawFlowFailureModuleValueType2Type): + """ + + iterator: Union[ + DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0, + DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1, + ] + skip_failures: bool + type: DeleteCompletedJobResponse200RawFlowFailureModuleValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0, + DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0.from_dict( + data + ) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = DeleteCompletedJobResponse200RawFlowFailureModuleValueType2Type(d.pop("type")) + + delete_completed_job_response_200_raw_flow_failure_module_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + delete_completed_job_response_200_raw_flow_failure_module_value_type_2.additional_properties = d + return delete_completed_job_response_200_raw_flow_failure_module_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..7484853565 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0_type import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0: + """ + Attributes: + type (DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0.additional_properties = d + return delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..9d97029e28 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..b9ca815355 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1_type import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1: + """ + Attributes: + expr (str): + type (DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1Type): + """ + + expr: str + type: DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1Type(d.pop("type")) + + delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1.additional_properties = d + return delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..2021d0b861 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2_type.py new file mode 100644 index 0000000000..9cb8240b42 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200RawFlowFailureModuleValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_3.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_3.py new file mode 100644 index 0000000000..b7560f0519 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_3.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_failure_module_value_type_3_type import ( + DeleteCompletedJobResponse200RawFlowFailureModuleValueType3Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowFailureModuleValueType3") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowFailureModuleValueType3: + """ + Attributes: + type (DeleteCompletedJobResponse200RawFlowFailureModuleValueType3Type): + path (Union[Unset, str]): + """ + + type: DeleteCompletedJobResponse200RawFlowFailureModuleValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = DeleteCompletedJobResponse200RawFlowFailureModuleValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + delete_completed_job_response_200_raw_flow_failure_module_value_type_3 = cls( + type=type, + path=path, + ) + + delete_completed_job_response_200_raw_flow_failure_module_value_type_3.additional_properties = d + return delete_completed_job_response_200_raw_flow_failure_module_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_3_type.py new file mode 100644 index 0000000000..8ac569a991 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_failure_module_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200RawFlowFailureModuleValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item.py new file mode 100644 index 0000000000..25b201a2c3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item.py @@ -0,0 +1,259 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_modules_item_input_transforms import ( + DeleteCompletedJobResponse200RawFlowModulesItemInputTransforms, +) +from ..models.delete_completed_job_response_200_raw_flow_modules_item_retry import ( + DeleteCompletedJobResponse200RawFlowModulesItemRetry, +) +from ..models.delete_completed_job_response_200_raw_flow_modules_item_sleep_type_0 import ( + DeleteCompletedJobResponse200RawFlowModulesItemSleepType0, +) +from ..models.delete_completed_job_response_200_raw_flow_modules_item_sleep_type_1 import ( + DeleteCompletedJobResponse200RawFlowModulesItemSleepType1, +) +from ..models.delete_completed_job_response_200_raw_flow_modules_item_stop_after_if import ( + DeleteCompletedJobResponse200RawFlowModulesItemStopAfterIf, +) +from ..models.delete_completed_job_response_200_raw_flow_modules_item_value_type_0 import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType0, +) +from ..models.delete_completed_job_response_200_raw_flow_modules_item_value_type_1 import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType1, +) +from ..models.delete_completed_job_response_200_raw_flow_modules_item_value_type_2 import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType2, +) +from ..models.delete_completed_job_response_200_raw_flow_modules_item_value_type_3 import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType3, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowModulesItem") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowModulesItem: + """ + Attributes: + input_transforms (DeleteCompletedJobResponse200RawFlowModulesItemInputTransforms): + value (Union[DeleteCompletedJobResponse200RawFlowModulesItemValueType0, + DeleteCompletedJobResponse200RawFlowModulesItemValueType1, + DeleteCompletedJobResponse200RawFlowModulesItemValueType2, + DeleteCompletedJobResponse200RawFlowModulesItemValueType3]): + stop_after_if (Union[Unset, DeleteCompletedJobResponse200RawFlowModulesItemStopAfterIf]): + sleep (Union[DeleteCompletedJobResponse200RawFlowModulesItemSleepType0, + DeleteCompletedJobResponse200RawFlowModulesItemSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, DeleteCompletedJobResponse200RawFlowModulesItemRetry]): + """ + + input_transforms: DeleteCompletedJobResponse200RawFlowModulesItemInputTransforms + value: Union[ + DeleteCompletedJobResponse200RawFlowModulesItemValueType0, + DeleteCompletedJobResponse200RawFlowModulesItemValueType1, + DeleteCompletedJobResponse200RawFlowModulesItemValueType2, + DeleteCompletedJobResponse200RawFlowModulesItemValueType3, + ] + stop_after_if: Union[Unset, DeleteCompletedJobResponse200RawFlowModulesItemStopAfterIf] = UNSET + sleep: Union[ + DeleteCompletedJobResponse200RawFlowModulesItemSleepType0, + DeleteCompletedJobResponse200RawFlowModulesItemSleepType1, + Unset, + ] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, DeleteCompletedJobResponse200RawFlowModulesItemRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, DeleteCompletedJobResponse200RawFlowModulesItemValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, DeleteCompletedJobResponse200RawFlowModulesItemValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, DeleteCompletedJobResponse200RawFlowModulesItemValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, DeleteCompletedJobResponse200RawFlowModulesItemSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = DeleteCompletedJobResponse200RawFlowModulesItemInputTransforms.from_dict( + d.pop("input_transforms") + ) + + def _parse_value( + data: object, + ) -> Union[ + DeleteCompletedJobResponse200RawFlowModulesItemValueType0, + DeleteCompletedJobResponse200RawFlowModulesItemValueType1, + DeleteCompletedJobResponse200RawFlowModulesItemValueType2, + DeleteCompletedJobResponse200RawFlowModulesItemValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = DeleteCompletedJobResponse200RawFlowModulesItemValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = DeleteCompletedJobResponse200RawFlowModulesItemValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = DeleteCompletedJobResponse200RawFlowModulesItemValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = DeleteCompletedJobResponse200RawFlowModulesItemValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, DeleteCompletedJobResponse200RawFlowModulesItemStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = DeleteCompletedJobResponse200RawFlowModulesItemStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[ + DeleteCompletedJobResponse200RawFlowModulesItemSleepType0, + DeleteCompletedJobResponse200RawFlowModulesItemSleepType1, + Unset, + ]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, DeleteCompletedJobResponse200RawFlowModulesItemSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = DeleteCompletedJobResponse200RawFlowModulesItemSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, DeleteCompletedJobResponse200RawFlowModulesItemSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = DeleteCompletedJobResponse200RawFlowModulesItemSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, DeleteCompletedJobResponse200RawFlowModulesItemRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = DeleteCompletedJobResponse200RawFlowModulesItemRetry.from_dict(_retry) + + delete_completed_job_response_200_raw_flow_modules_item = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + delete_completed_job_response_200_raw_flow_modules_item.additional_properties = d + return delete_completed_job_response_200_raw_flow_modules_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_input_transforms.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_input_transforms.py new file mode 100644 index 0000000000..8e43318654 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_input_transforms.py @@ -0,0 +1,113 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0 import ( + DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0, +) +from ..models.delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1 import ( + DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowModulesItemInputTransforms") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowModulesItemInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0, + DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + delete_completed_job_response_200_raw_flow_modules_item_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0, + DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0.from_dict( + data + ) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1.from_dict( + data + ) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + delete_completed_job_response_200_raw_flow_modules_item_input_transforms.additional_properties = ( + additional_properties + ) + return delete_completed_job_response_200_raw_flow_modules_item_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0, + DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0, + DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..f4f6226558 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0_type import ( + DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0.additional_properties = ( + d + ) + return delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..b49eb6bed3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..acacddffb5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1_type import ( + DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1.additional_properties = ( + d + ) + return delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..0803313019 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_retry.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_retry.py new file mode 100644 index 0000000000..43a60a6897 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_retry.py @@ -0,0 +1,86 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_modules_item_retry_constant import ( + DeleteCompletedJobResponse200RawFlowModulesItemRetryConstant, +) +from ..models.delete_completed_job_response_200_raw_flow_modules_item_retry_exponential import ( + DeleteCompletedJobResponse200RawFlowModulesItemRetryExponential, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowModulesItemRetry") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowModulesItemRetry: + """ + Attributes: + constant (Union[Unset, DeleteCompletedJobResponse200RawFlowModulesItemRetryConstant]): + exponential (Union[Unset, DeleteCompletedJobResponse200RawFlowModulesItemRetryExponential]): + """ + + constant: Union[Unset, DeleteCompletedJobResponse200RawFlowModulesItemRetryConstant] = UNSET + exponential: Union[Unset, DeleteCompletedJobResponse200RawFlowModulesItemRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, DeleteCompletedJobResponse200RawFlowModulesItemRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = DeleteCompletedJobResponse200RawFlowModulesItemRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, DeleteCompletedJobResponse200RawFlowModulesItemRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = DeleteCompletedJobResponse200RawFlowModulesItemRetryExponential.from_dict(_exponential) + + delete_completed_job_response_200_raw_flow_modules_item_retry = cls( + constant=constant, + exponential=exponential, + ) + + delete_completed_job_response_200_raw_flow_modules_item_retry.additional_properties = d + return delete_completed_job_response_200_raw_flow_modules_item_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_retry_constant.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_retry_constant.py new file mode 100644 index 0000000000..4f2a0b863d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowModulesItemRetryConstant") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowModulesItemRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + delete_completed_job_response_200_raw_flow_modules_item_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + delete_completed_job_response_200_raw_flow_modules_item_retry_constant.additional_properties = d + return delete_completed_job_response_200_raw_flow_modules_item_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_retry_exponential.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_retry_exponential.py new file mode 100644 index 0000000000..e92cfcaf3f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowModulesItemRetryExponential") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowModulesItemRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + delete_completed_job_response_200_raw_flow_modules_item_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + delete_completed_job_response_200_raw_flow_modules_item_retry_exponential.additional_properties = d + return delete_completed_job_response_200_raw_flow_modules_item_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_sleep_type_0.py new file mode 100644 index 0000000000..58712ac442 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_sleep_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_modules_item_sleep_type_0_type import ( + DeleteCompletedJobResponse200RawFlowModulesItemSleepType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowModulesItemSleepType0") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowModulesItemSleepType0: + """ + Attributes: + type (DeleteCompletedJobResponse200RawFlowModulesItemSleepType0Type): + value (Union[Unset, Any]): + """ + + type: DeleteCompletedJobResponse200RawFlowModulesItemSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = DeleteCompletedJobResponse200RawFlowModulesItemSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + delete_completed_job_response_200_raw_flow_modules_item_sleep_type_0 = cls( + type=type, + value=value, + ) + + delete_completed_job_response_200_raw_flow_modules_item_sleep_type_0.additional_properties = d + return delete_completed_job_response_200_raw_flow_modules_item_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_sleep_type_0_type.py new file mode 100644 index 0000000000..694bf9d631 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200RawFlowModulesItemSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_sleep_type_1.py new file mode 100644 index 0000000000..35688ac4c7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_sleep_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_modules_item_sleep_type_1_type import ( + DeleteCompletedJobResponse200RawFlowModulesItemSleepType1Type, +) + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowModulesItemSleepType1") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowModulesItemSleepType1: + """ + Attributes: + expr (str): + type (DeleteCompletedJobResponse200RawFlowModulesItemSleepType1Type): + """ + + expr: str + type: DeleteCompletedJobResponse200RawFlowModulesItemSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = DeleteCompletedJobResponse200RawFlowModulesItemSleepType1Type(d.pop("type")) + + delete_completed_job_response_200_raw_flow_modules_item_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + delete_completed_job_response_200_raw_flow_modules_item_sleep_type_1.additional_properties = d + return delete_completed_job_response_200_raw_flow_modules_item_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_sleep_type_1_type.py new file mode 100644 index 0000000000..5ce7b61c3f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200RawFlowModulesItemSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_stop_after_if.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_stop_after_if.py new file mode 100644 index 0000000000..57bea2b18d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowModulesItemStopAfterIf") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowModulesItemStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + delete_completed_job_response_200_raw_flow_modules_item_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + delete_completed_job_response_200_raw_flow_modules_item_stop_after_if.additional_properties = d + return delete_completed_job_response_200_raw_flow_modules_item_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_0.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_0.py new file mode 100644 index 0000000000..e0d54b8a8d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_modules_item_value_type_0_language import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowModulesItemValueType0") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowModulesItemValueType0: + """ + Attributes: + content (str): + language (DeleteCompletedJobResponse200RawFlowModulesItemValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: DeleteCompletedJobResponse200RawFlowModulesItemValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = DeleteCompletedJobResponse200RawFlowModulesItemValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + delete_completed_job_response_200_raw_flow_modules_item_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + delete_completed_job_response_200_raw_flow_modules_item_value_type_0.additional_properties = d + return delete_completed_job_response_200_raw_flow_modules_item_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_0_language.py new file mode 100644 index 0000000000..5cf9ef7cd5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200RawFlowModulesItemValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_1.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_1.py new file mode 100644 index 0000000000..da6ea2c6cf --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_modules_item_value_type_1_type import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType1Type, +) + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowModulesItemValueType1") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowModulesItemValueType1: + """ + Attributes: + path (str): + type (DeleteCompletedJobResponse200RawFlowModulesItemValueType1Type): + """ + + path: str + type: DeleteCompletedJobResponse200RawFlowModulesItemValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = DeleteCompletedJobResponse200RawFlowModulesItemValueType1Type(d.pop("type")) + + delete_completed_job_response_200_raw_flow_modules_item_value_type_1 = cls( + path=path, + type=type, + ) + + delete_completed_job_response_200_raw_flow_modules_item_value_type_1.additional_properties = d + return delete_completed_job_response_200_raw_flow_modules_item_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_1_type.py new file mode 100644 index 0000000000..ec6bc9d153 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200RawFlowModulesItemValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2.py new file mode 100644 index 0000000000..6b24b66125 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2.py @@ -0,0 +1,112 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0 import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0, +) +from ..models.delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1 import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1, +) +from ..models.delete_completed_job_response_200_raw_flow_modules_item_value_type_2_type import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType2Type, +) + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowModulesItemValueType2") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowModulesItemValueType2: + """ + Attributes: + iterator (Union[DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0, + DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1]): + skip_failures (bool): + type (DeleteCompletedJobResponse200RawFlowModulesItemValueType2Type): + """ + + iterator: Union[ + DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0, + DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1, + ] + skip_failures: bool + type: DeleteCompletedJobResponse200RawFlowModulesItemValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0, + DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = DeleteCompletedJobResponse200RawFlowModulesItemValueType2Type(d.pop("type")) + + delete_completed_job_response_200_raw_flow_modules_item_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + delete_completed_job_response_200_raw_flow_modules_item_value_type_2.additional_properties = d + return delete_completed_job_response_200_raw_flow_modules_item_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..fee347346d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0_type import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0: + """ + Attributes: + type (DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0.additional_properties = d + return delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..1b35a1d63a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..32ff632203 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1_type import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1: + """ + Attributes: + expr (str): + type (DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1Type): + """ + + expr: str + type: DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1Type(d.pop("type")) + + delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1.additional_properties = d + return delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..0761f8b116 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2_type.py new file mode 100644 index 0000000000..cd71537ac2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200RawFlowModulesItemValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_3.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_3.py new file mode 100644 index 0000000000..407b667951 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_3.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.delete_completed_job_response_200_raw_flow_modules_item_value_type_3_type import ( + DeleteCompletedJobResponse200RawFlowModulesItemValueType3Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteCompletedJobResponse200RawFlowModulesItemValueType3") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200RawFlowModulesItemValueType3: + """ + Attributes: + type (DeleteCompletedJobResponse200RawFlowModulesItemValueType3Type): + path (Union[Unset, str]): + """ + + type: DeleteCompletedJobResponse200RawFlowModulesItemValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = DeleteCompletedJobResponse200RawFlowModulesItemValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + delete_completed_job_response_200_raw_flow_modules_item_value_type_3 = cls( + type=type, + path=path, + ) + + delete_completed_job_response_200_raw_flow_modules_item_value_type_3.additional_properties = d + return delete_completed_job_response_200_raw_flow_modules_item_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_3_type.py new file mode 100644 index 0000000000..7fc4ddb864 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_raw_flow_modules_item_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class DeleteCompletedJobResponse200RawFlowModulesItemValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_result.py b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_result.py new file mode 100644 index 0000000000..5f000ee9a4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_completed_job_response_200_result.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="DeleteCompletedJobResponse200Result") + + +@attr.s(auto_attribs=True) +class DeleteCompletedJobResponse200Result: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + delete_completed_job_response_200_result = cls() + + delete_completed_job_response_200_result.additional_properties = d + return delete_completed_job_response_200_result + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_invite_json_body.py b/python-client/windmill-api/windmill_api/models/delete_invite_json_body.py new file mode 100644 index 0000000000..ebba2af5ef --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_invite_json_body.py @@ -0,0 +1,64 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="DeleteInviteJsonBody") + + +@attr.s(auto_attribs=True) +class DeleteInviteJsonBody: + """ + Attributes: + email (str): + is_admin (bool): + """ + + email: str + is_admin: bool + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + email = self.email + is_admin = self.is_admin + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "email": email, + "is_admin": is_admin, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + email = d.pop("email") + + is_admin = d.pop("is_admin") + + delete_invite_json_body = cls( + email=email, + is_admin=is_admin, + ) + + delete_invite_json_body.additional_properties = d + return delete_invite_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_script_by_hash_response_200.py b/python-client/windmill-api/windmill_api/models/delete_script_by_hash_response_200.py new file mode 100644 index 0000000000..05827cfe82 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_script_by_hash_response_200.py @@ -0,0 +1,206 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr +from dateutil.parser import isoparse + +from ..models.delete_script_by_hash_response_200_extra_perms import DeleteScriptByHashResponse200ExtraPerms +from ..models.delete_script_by_hash_response_200_kind import DeleteScriptByHashResponse200Kind +from ..models.delete_script_by_hash_response_200_language import DeleteScriptByHashResponse200Language +from ..models.delete_script_by_hash_response_200_schema import DeleteScriptByHashResponse200Schema +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteScriptByHashResponse200") + + +@attr.s(auto_attribs=True) +class DeleteScriptByHashResponse200: + """ + Attributes: + hash_ (str): + path (str): + summary (str): + content (str): + created_by (str): + created_at (datetime.datetime): + archived (bool): + deleted (bool): + is_template (bool): + extra_perms (DeleteScriptByHashResponse200ExtraPerms): + language (DeleteScriptByHashResponse200Language): + kind (DeleteScriptByHashResponse200Kind): + workspace_id (Union[Unset, str]): + parent_hashes (Union[Unset, List[str]]): The first element is the direct parent of the script, the second is the + parent of the first, etc + description (Union[Unset, str]): + schema (Union[Unset, DeleteScriptByHashResponse200Schema]): + lock (Union[Unset, str]): + lock_error_logs (Union[Unset, str]): + """ + + hash_: str + path: str + summary: str + content: str + created_by: str + created_at: datetime.datetime + archived: bool + deleted: bool + is_template: bool + extra_perms: DeleteScriptByHashResponse200ExtraPerms + language: DeleteScriptByHashResponse200Language + kind: DeleteScriptByHashResponse200Kind + workspace_id: Union[Unset, str] = UNSET + parent_hashes: Union[Unset, List[str]] = UNSET + description: Union[Unset, str] = UNSET + schema: Union[Unset, DeleteScriptByHashResponse200Schema] = UNSET + lock: Union[Unset, str] = UNSET + lock_error_logs: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + hash_ = self.hash_ + path = self.path + summary = self.summary + content = self.content + created_by = self.created_by + created_at = self.created_at.isoformat() + + archived = self.archived + deleted = self.deleted + is_template = self.is_template + extra_perms = self.extra_perms.to_dict() + + language = self.language.value + + kind = self.kind.value + + workspace_id = self.workspace_id + parent_hashes: Union[Unset, List[str]] = UNSET + if not isinstance(self.parent_hashes, Unset): + parent_hashes = self.parent_hashes + + description = self.description + schema: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.schema, Unset): + schema = self.schema.to_dict() + + lock = self.lock + lock_error_logs = self.lock_error_logs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "hash": hash_, + "path": path, + "summary": summary, + "content": content, + "created_by": created_by, + "created_at": created_at, + "archived": archived, + "deleted": deleted, + "is_template": is_template, + "extra_perms": extra_perms, + "language": language, + "kind": kind, + } + ) + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if parent_hashes is not UNSET: + field_dict["parent_hashes"] = parent_hashes + if description is not UNSET: + field_dict["description"] = description + if schema is not UNSET: + field_dict["schema"] = schema + if lock is not UNSET: + field_dict["lock"] = lock + if lock_error_logs is not UNSET: + field_dict["lock_error_logs"] = lock_error_logs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + hash_ = d.pop("hash") + + path = d.pop("path") + + summary = d.pop("summary") + + content = d.pop("content") + + created_by = d.pop("created_by") + + created_at = isoparse(d.pop("created_at")) + + archived = d.pop("archived") + + deleted = d.pop("deleted") + + is_template = d.pop("is_template") + + extra_perms = DeleteScriptByHashResponse200ExtraPerms.from_dict(d.pop("extra_perms")) + + language = DeleteScriptByHashResponse200Language(d.pop("language")) + + kind = DeleteScriptByHashResponse200Kind(d.pop("kind")) + + workspace_id = d.pop("workspace_id", UNSET) + + parent_hashes = cast(List[str], d.pop("parent_hashes", UNSET)) + + description = d.pop("description", UNSET) + + _schema = d.pop("schema", UNSET) + schema: Union[Unset, DeleteScriptByHashResponse200Schema] + if isinstance(_schema, Unset): + schema = UNSET + else: + schema = DeleteScriptByHashResponse200Schema.from_dict(_schema) + + lock = d.pop("lock", UNSET) + + lock_error_logs = d.pop("lock_error_logs", UNSET) + + delete_script_by_hash_response_200 = cls( + hash_=hash_, + path=path, + summary=summary, + content=content, + created_by=created_by, + created_at=created_at, + archived=archived, + deleted=deleted, + is_template=is_template, + extra_perms=extra_perms, + language=language, + kind=kind, + workspace_id=workspace_id, + parent_hashes=parent_hashes, + description=description, + schema=schema, + lock=lock, + lock_error_logs=lock_error_logs, + ) + + delete_script_by_hash_response_200.additional_properties = d + return delete_script_by_hash_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_script_by_hash_response_200_extra_perms.py b/python-client/windmill-api/windmill_api/models/delete_script_by_hash_response_200_extra_perms.py new file mode 100644 index 0000000000..01199034b2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_script_by_hash_response_200_extra_perms.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="DeleteScriptByHashResponse200ExtraPerms") + + +@attr.s(auto_attribs=True) +class DeleteScriptByHashResponse200ExtraPerms: + """ """ + + additional_properties: Dict[str, bool] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + delete_script_by_hash_response_200_extra_perms = cls() + + delete_script_by_hash_response_200_extra_perms.additional_properties = d + return delete_script_by_hash_response_200_extra_perms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> bool: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: bool) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/delete_script_by_hash_response_200_kind.py b/python-client/windmill-api/windmill_api/models/delete_script_by_hash_response_200_kind.py new file mode 100644 index 0000000000..ce832fbbdf --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_script_by_hash_response_200_kind.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class DeleteScriptByHashResponse200Kind(str, Enum): + SCRIPT = "script" + FAILURE = "failure" + TRIGGER = "trigger" + COMMAND = "command" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_script_by_hash_response_200_language.py b/python-client/windmill-api/windmill_api/models/delete_script_by_hash_response_200_language.py new file mode 100644 index 0000000000..2106ce5b20 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_script_by_hash_response_200_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class DeleteScriptByHashResponse200Language(str, Enum): + PYTHON3 = "python3" + DENO = "deno" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/delete_script_by_hash_response_200_schema.py b/python-client/windmill-api/windmill_api/models/delete_script_by_hash_response_200_schema.py new file mode 100644 index 0000000000..def2b4df51 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/delete_script_by_hash_response_200_schema.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="DeleteScriptByHashResponse200Schema") + + +@attr.s(auto_attribs=True) +class DeleteScriptByHashResponse200Schema: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + delete_script_by_hash_response_200_schema = cls() + + delete_script_by_hash_response_200_schema.additional_properties = d + return delete_script_by_hash_response_200_schema + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200.py b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200.py new file mode 100644 index 0000000000..9b53224fa2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.deno_to_jsonschema_response_200_args_item import DenoToJsonschemaResponse200ArgsItem +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DenoToJsonschemaResponse200") + + +@attr.s(auto_attribs=True) +class DenoToJsonschemaResponse200: + """ + Attributes: + star_args (bool): + args (List[DenoToJsonschemaResponse200ArgsItem]): + star_kwargs (Union[Unset, bool]): + """ + + star_args: bool + args: List[DenoToJsonschemaResponse200ArgsItem] + star_kwargs: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + star_args = self.star_args + args = [] + for args_item_data in self.args: + args_item = args_item_data.to_dict() + + args.append(args_item) + + star_kwargs = self.star_kwargs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "star_args": star_args, + "args": args, + } + ) + if star_kwargs is not UNSET: + field_dict["star_kwargs"] = star_kwargs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + star_args = d.pop("star_args") + + args = [] + _args = d.pop("args") + for args_item_data in _args: + args_item = DenoToJsonschemaResponse200ArgsItem.from_dict(args_item_data) + + args.append(args_item) + + star_kwargs = d.pop("star_kwargs", UNSET) + + deno_to_jsonschema_response_200 = cls( + star_args=star_args, + args=args, + star_kwargs=star_kwargs, + ) + + deno_to_jsonschema_response_200.additional_properties = d + return deno_to_jsonschema_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item.py b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item.py new file mode 100644 index 0000000000..f2391b69a5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item.py @@ -0,0 +1,157 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.deno_to_jsonschema_response_200_args_item_typ_type_0 import DenoToJsonschemaResponse200ArgsItemTypType0 +from ..models.deno_to_jsonschema_response_200_args_item_typ_type_1 import DenoToJsonschemaResponse200ArgsItemTypType1 +from ..models.deno_to_jsonschema_response_200_args_item_typ_type_2 import DenoToJsonschemaResponse200ArgsItemTypType2 +from ..models.deno_to_jsonschema_response_200_args_item_typ_type_3 import DenoToJsonschemaResponse200ArgsItemTypType3 +from ..models.deno_to_jsonschema_response_200_args_item_typ_type_4 import DenoToJsonschemaResponse200ArgsItemTypType4 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DenoToJsonschemaResponse200ArgsItem") + + +@attr.s(auto_attribs=True) +class DenoToJsonschemaResponse200ArgsItem: + """ + Attributes: + name (str): + typ (Union[DenoToJsonschemaResponse200ArgsItemTypType0, DenoToJsonschemaResponse200ArgsItemTypType1, + DenoToJsonschemaResponse200ArgsItemTypType2, DenoToJsonschemaResponse200ArgsItemTypType3, + DenoToJsonschemaResponse200ArgsItemTypType4]): + has_default (Union[Unset, bool]): + default (Union[Unset, Any]): + """ + + name: str + typ: Union[ + DenoToJsonschemaResponse200ArgsItemTypType0, + DenoToJsonschemaResponse200ArgsItemTypType1, + DenoToJsonschemaResponse200ArgsItemTypType2, + DenoToJsonschemaResponse200ArgsItemTypType3, + DenoToJsonschemaResponse200ArgsItemTypType4, + ] + has_default: Union[Unset, bool] = UNSET + default: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + + if isinstance(self.typ, DenoToJsonschemaResponse200ArgsItemTypType0): + typ = self.typ.value + + elif isinstance(self.typ, DenoToJsonschemaResponse200ArgsItemTypType1): + typ = self.typ.to_dict() + + elif isinstance(self.typ, DenoToJsonschemaResponse200ArgsItemTypType2): + typ = self.typ.to_dict() + + elif isinstance(self.typ, DenoToJsonschemaResponse200ArgsItemTypType3): + typ = self.typ.to_dict() + + else: + typ = self.typ.to_dict() + + has_default = self.has_default + default = self.default + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "typ": typ, + } + ) + if has_default is not UNSET: + field_dict["has_default"] = has_default + if default is not UNSET: + field_dict["default"] = default + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name") + + def _parse_typ( + data: object, + ) -> Union[ + DenoToJsonschemaResponse200ArgsItemTypType0, + DenoToJsonschemaResponse200ArgsItemTypType1, + DenoToJsonschemaResponse200ArgsItemTypType2, + DenoToJsonschemaResponse200ArgsItemTypType3, + DenoToJsonschemaResponse200ArgsItemTypType4, + ]: + try: + if not isinstance(data, str): + raise TypeError() + typ_type_0 = DenoToJsonschemaResponse200ArgsItemTypType0(data) + + return typ_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + typ_type_1 = DenoToJsonschemaResponse200ArgsItemTypType1.from_dict(data) + + return typ_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + typ_type_2 = DenoToJsonschemaResponse200ArgsItemTypType2.from_dict(data) + + return typ_type_2 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + typ_type_3 = DenoToJsonschemaResponse200ArgsItemTypType3.from_dict(data) + + return typ_type_3 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + typ_type_4 = DenoToJsonschemaResponse200ArgsItemTypType4.from_dict(data) + + return typ_type_4 + + typ = _parse_typ(d.pop("typ")) + + has_default = d.pop("has_default", UNSET) + + default = d.pop("default", UNSET) + + deno_to_jsonschema_response_200_args_item = cls( + name=name, + typ=typ, + has_default=has_default, + default=default, + ) + + deno_to_jsonschema_response_200_args_item.additional_properties = d + return deno_to_jsonschema_response_200_args_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_0.py b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_0.py new file mode 100644 index 0000000000..d7b38e3855 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_0.py @@ -0,0 +1,16 @@ +from enum import Enum + + +class DenoToJsonschemaResponse200ArgsItemTypType0(str, Enum): + FLOAT = "float" + INT = "int" + BOOL = "bool" + EMAIL = "email" + UNKNOWN = "unknown" + BYTES = "bytes" + DICT = "dict" + DATETIME = "datetime" + SQL = "sql" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_1.py b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_1.py new file mode 100644 index 0000000000..3117d9d616 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_1.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Optional, Type, TypeVar + +import attr + +T = TypeVar("T", bound="DenoToJsonschemaResponse200ArgsItemTypType1") + + +@attr.s(auto_attribs=True) +class DenoToJsonschemaResponse200ArgsItemTypType1: + """ + Attributes: + resource (Optional[str]): + """ + + resource: Optional[str] + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + resource = self.resource + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "resource": resource, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + resource = d.pop("resource") + + deno_to_jsonschema_response_200_args_item_typ_type_1 = cls( + resource=resource, + ) + + deno_to_jsonschema_response_200_args_item_typ_type_1.additional_properties = d + return deno_to_jsonschema_response_200_args_item_typ_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_2.py b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_2.py new file mode 100644 index 0000000000..71320dda10 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_2.py @@ -0,0 +1,60 @@ +from typing import Any, Dict, List, Optional, Type, TypeVar, cast + +import attr + +T = TypeVar("T", bound="DenoToJsonschemaResponse200ArgsItemTypType2") + + +@attr.s(auto_attribs=True) +class DenoToJsonschemaResponse200ArgsItemTypType2: + """ + Attributes: + str_ (Optional[List[str]]): + """ + + str_: Optional[List[str]] + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if self.str_ is None: + str_ = None + else: + str_ = self.str_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "str": str_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + str_ = cast(List[str], d.pop("str")) + + deno_to_jsonschema_response_200_args_item_typ_type_2 = cls( + str_=str_, + ) + + deno_to_jsonschema_response_200_args_item_typ_type_2.additional_properties = d + return deno_to_jsonschema_response_200_args_item_typ_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_3.py b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_3.py new file mode 100644 index 0000000000..3b46cb9a01 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_3.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.deno_to_jsonschema_response_200_args_item_typ_type_3_object_item import ( + DenoToJsonschemaResponse200ArgsItemTypType3ObjectItem, +) + +T = TypeVar("T", bound="DenoToJsonschemaResponse200ArgsItemTypType3") + + +@attr.s(auto_attribs=True) +class DenoToJsonschemaResponse200ArgsItemTypType3: + """ + Attributes: + object_ (List[DenoToJsonschemaResponse200ArgsItemTypType3ObjectItem]): + """ + + object_: List[DenoToJsonschemaResponse200ArgsItemTypType3ObjectItem] + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + object_ = [] + for object_item_data in self.object_: + object_item = object_item_data.to_dict() + + object_.append(object_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "object": object_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + object_ = [] + _object_ = d.pop("object") + for object_item_data in _object_: + object_item = DenoToJsonschemaResponse200ArgsItemTypType3ObjectItem.from_dict(object_item_data) + + object_.append(object_item) + + deno_to_jsonschema_response_200_args_item_typ_type_3 = cls( + object_=object_, + ) + + deno_to_jsonschema_response_200_args_item_typ_type_3.additional_properties = d + return deno_to_jsonschema_response_200_args_item_typ_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_3_object_item.py b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_3_object_item.py new file mode 100644 index 0000000000..f5a709be0d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_3_object_item.py @@ -0,0 +1,100 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.deno_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_0 import ( + DenoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0, +) +from ..models.deno_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1 import ( + DenoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1, +) + +T = TypeVar("T", bound="DenoToJsonschemaResponse200ArgsItemTypType3ObjectItem") + + +@attr.s(auto_attribs=True) +class DenoToJsonschemaResponse200ArgsItemTypType3ObjectItem: + """ + Attributes: + key (str): + typ (Union[DenoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0, + DenoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1]): + """ + + key: str + typ: Union[ + DenoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0, + DenoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1, + ] + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + key = self.key + + if isinstance(self.typ, DenoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0): + typ = self.typ.value + + else: + typ = self.typ.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "key": key, + "typ": typ, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + key = d.pop("key") + + def _parse_typ( + data: object, + ) -> Union[ + DenoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0, + DenoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1, + ]: + try: + if not isinstance(data, str): + raise TypeError() + typ_type_0 = DenoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0(data) + + return typ_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + typ_type_1 = DenoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1.from_dict(data) + + return typ_type_1 + + typ = _parse_typ(d.pop("typ")) + + deno_to_jsonschema_response_200_args_item_typ_type_3_object_item = cls( + key=key, + typ=typ, + ) + + deno_to_jsonschema_response_200_args_item_typ_type_3_object_item.additional_properties = d + return deno_to_jsonschema_response_200_args_item_typ_type_3_object_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_0.py b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_0.py new file mode 100644 index 0000000000..805d71d972 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_0.py @@ -0,0 +1,16 @@ +from enum import Enum + + +class DenoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0(str, Enum): + FLOAT = "float" + INT = "int" + BOOL = "bool" + EMAIL = "email" + UNKNOWN = "unknown" + BYTES = "bytes" + DICT = "dict" + DATETIME = "datetime" + SQL = "sql" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1.py b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1.py new file mode 100644 index 0000000000..186df3567b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="DenoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1") + + +@attr.s(auto_attribs=True) +class DenoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1: + """ + Attributes: + str_ (Any): + """ + + str_: Any + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + str_ = self.str_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "str": str_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + str_ = d.pop("str") + + deno_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1 = cls( + str_=str_, + ) + + deno_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1.additional_properties = d + return deno_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_4.py b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_4.py new file mode 100644 index 0000000000..c493bc4e60 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_4.py @@ -0,0 +1,99 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.deno_to_jsonschema_response_200_args_item_typ_type_4_list_type_0 import ( + DenoToJsonschemaResponse200ArgsItemTypType4ListType0, +) +from ..models.deno_to_jsonschema_response_200_args_item_typ_type_4_list_type_1 import ( + DenoToJsonschemaResponse200ArgsItemTypType4ListType1, +) + +T = TypeVar("T", bound="DenoToJsonschemaResponse200ArgsItemTypType4") + + +@attr.s(auto_attribs=True) +class DenoToJsonschemaResponse200ArgsItemTypType4: + """ + Attributes: + list_ (Union[DenoToJsonschemaResponse200ArgsItemTypType4ListType0, + DenoToJsonschemaResponse200ArgsItemTypType4ListType1, None]): + """ + + list_: Union[ + DenoToJsonschemaResponse200ArgsItemTypType4ListType0, DenoToJsonschemaResponse200ArgsItemTypType4ListType1, None + ] + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + list_: Union[Dict[str, Any], None, str] + if self.list_ is None: + list_ = None + + elif isinstance(self.list_, DenoToJsonschemaResponse200ArgsItemTypType4ListType0): + list_ = self.list_.value + + else: + list_ = self.list_.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "list": list_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_list_( + data: object, + ) -> Union[ + DenoToJsonschemaResponse200ArgsItemTypType4ListType0, + DenoToJsonschemaResponse200ArgsItemTypType4ListType1, + None, + ]: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + list_type_0 = DenoToJsonschemaResponse200ArgsItemTypType4ListType0(data) + + return list_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + list_type_1 = DenoToJsonschemaResponse200ArgsItemTypType4ListType1.from_dict(data) + + return list_type_1 + + list_ = _parse_list_(d.pop("list")) + + deno_to_jsonschema_response_200_args_item_typ_type_4 = cls( + list_=list_, + ) + + deno_to_jsonschema_response_200_args_item_typ_type_4.additional_properties = d + return deno_to_jsonschema_response_200_args_item_typ_type_4 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_4_list_type_0.py b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_4_list_type_0.py new file mode 100644 index 0000000000..d433b8f2b4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_4_list_type_0.py @@ -0,0 +1,16 @@ +from enum import Enum + + +class DenoToJsonschemaResponse200ArgsItemTypType4ListType0(str, Enum): + FLOAT = "float" + INT = "int" + BOOL = "bool" + EMAIL = "email" + UNKNOWN = "unknown" + BYTES = "bytes" + DICT = "dict" + DATETIME = "datetime" + SQL = "sql" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_4_list_type_1.py b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_4_list_type_1.py new file mode 100644 index 0000000000..77930c22c7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/deno_to_jsonschema_response_200_args_item_typ_type_4_list_type_1.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="DenoToJsonschemaResponse200ArgsItemTypType4ListType1") + + +@attr.s(auto_attribs=True) +class DenoToJsonschemaResponse200ArgsItemTypType4ListType1: + """ + Attributes: + str_ (Any): + """ + + str_: Any + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + str_ = self.str_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "str": str_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + str_ = d.pop("str") + + deno_to_jsonschema_response_200_args_item_typ_type_4_list_type_1 = cls( + str_=str_, + ) + + deno_to_jsonschema_response_200_args_item_typ_type_4_list_type_1.additional_properties = d + return deno_to_jsonschema_response_200_args_item_typ_type_4_list_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/edit_resource.py b/python-client/windmill-api/windmill_api/models/edit_resource.py new file mode 100644 index 0000000000..a19289e03c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/edit_resource.py @@ -0,0 +1,81 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.edit_resource_value import EditResourceValue +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EditResource") + + +@attr.s(auto_attribs=True) +class EditResource: + """ + Attributes: + path (Union[Unset, str]): + description (Union[Unset, str]): + value (Union[Unset, EditResourceValue]): + """ + + path: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + value: Union[Unset, EditResourceValue] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + description = self.description + value: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.value, Unset): + value = self.value.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if path is not UNSET: + field_dict["path"] = path + if description is not UNSET: + field_dict["description"] = description + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path", UNSET) + + description = d.pop("description", UNSET) + + _value = d.pop("value", UNSET) + value: Union[Unset, EditResourceValue] + if isinstance(_value, Unset): + value = UNSET + else: + value = EditResourceValue.from_dict(_value) + + edit_resource = cls( + path=path, + description=description, + value=value, + ) + + edit_resource.additional_properties = d + return edit_resource + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/edit_resource_type.py b/python-client/windmill-api/windmill_api/models/edit_resource_type.py new file mode 100644 index 0000000000..51ca6e8db6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/edit_resource_type.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EditResourceType") + + +@attr.s(auto_attribs=True) +class EditResourceType: + """ + Attributes: + schema (Union[Unset, str]): + description (Union[Unset, str]): + """ + + schema: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + schema = self.schema + description = self.description + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if schema is not UNSET: + field_dict["schema"] = schema + if description is not UNSET: + field_dict["description"] = description + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + schema = d.pop("schema", UNSET) + + description = d.pop("description", UNSET) + + edit_resource_type = cls( + schema=schema, + description=description, + ) + + edit_resource_type.additional_properties = d + return edit_resource_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/edit_resource_value.py b/python-client/windmill-api/windmill_api/models/edit_resource_value.py new file mode 100644 index 0000000000..2f7a38bc69 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/edit_resource_value.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="EditResourceValue") + + +@attr.s(auto_attribs=True) +class EditResourceValue: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + edit_resource_value = cls() + + edit_resource_value.additional_properties = d + return edit_resource_value + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/edit_schedule.py b/python-client/windmill-api/windmill_api/models/edit_schedule.py new file mode 100644 index 0000000000..36cb3bf5f3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/edit_schedule.py @@ -0,0 +1,80 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.edit_schedule_args import EditScheduleArgs + +T = TypeVar("T", bound="EditSchedule") + + +@attr.s(auto_attribs=True) +class EditSchedule: + """ + Attributes: + schedule (str): + script_path (str): + is_flow (bool): + args (EditScheduleArgs): + """ + + schedule: str + script_path: str + is_flow: bool + args: EditScheduleArgs + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + schedule = self.schedule + script_path = self.script_path + is_flow = self.is_flow + args = self.args.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "schedule": schedule, + "script_path": script_path, + "is_flow": is_flow, + "args": args, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + schedule = d.pop("schedule") + + script_path = d.pop("script_path") + + is_flow = d.pop("is_flow") + + args = EditScheduleArgs.from_dict(d.pop("args")) + + edit_schedule = cls( + schedule=schedule, + script_path=script_path, + is_flow=is_flow, + args=args, + ) + + edit_schedule.additional_properties = d + return edit_schedule + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/edit_schedule_args.py b/python-client/windmill-api/windmill_api/models/edit_schedule_args.py new file mode 100644 index 0000000000..d0ed184417 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/edit_schedule_args.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="EditScheduleArgs") + + +@attr.s(auto_attribs=True) +class EditScheduleArgs: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + edit_schedule_args = cls() + + edit_schedule_args.additional_properties = d + return edit_schedule_args + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/edit_slack_command_json_body.py b/python-client/windmill-api/windmill_api/models/edit_slack_command_json_body.py new file mode 100644 index 0000000000..8e7cad9470 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/edit_slack_command_json_body.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EditSlackCommandJsonBody") + + +@attr.s(auto_attribs=True) +class EditSlackCommandJsonBody: + """ + Attributes: + slack_command_script (Union[Unset, str]): + """ + + slack_command_script: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + slack_command_script = self.slack_command_script + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if slack_command_script is not UNSET: + field_dict["slack_command_script"] = slack_command_script + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + slack_command_script = d.pop("slack_command_script", UNSET) + + edit_slack_command_json_body = cls( + slack_command_script=slack_command_script, + ) + + edit_slack_command_json_body.additional_properties = d + return edit_slack_command_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/edit_variable.py b/python-client/windmill-api/windmill_api/models/edit_variable.py new file mode 100644 index 0000000000..bb8c559dca --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/edit_variable.py @@ -0,0 +1,81 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EditVariable") + + +@attr.s(auto_attribs=True) +class EditVariable: + """ + Attributes: + path (Union[Unset, str]): + value (Union[Unset, str]): + is_secret (Union[Unset, bool]): + description (Union[Unset, str]): + """ + + path: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + is_secret: Union[Unset, bool] = UNSET + description: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + value = self.value + is_secret = self.is_secret + description = self.description + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if path is not UNSET: + field_dict["path"] = path + if value is not UNSET: + field_dict["value"] = value + if is_secret is not UNSET: + field_dict["is_secret"] = is_secret + if description is not UNSET: + field_dict["description"] = description + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path", UNSET) + + value = d.pop("value", UNSET) + + is_secret = d.pop("is_secret", UNSET) + + description = d.pop("description", UNSET) + + edit_variable = cls( + path=path, + value=value, + is_secret=is_secret, + description=description, + ) + + edit_variable.additional_properties = d + return edit_variable + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/edit_workspace_user.py b/python-client/windmill-api/windmill_api/models/edit_workspace_user.py new file mode 100644 index 0000000000..a8462685a5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/edit_workspace_user.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EditWorkspaceUser") + + +@attr.s(auto_attribs=True) +class EditWorkspaceUser: + """ + Attributes: + is_admin (Union[Unset, bool]): + """ + + is_admin: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + is_admin = self.is_admin + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if is_admin is not UNSET: + field_dict["is_admin"] = is_admin + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + is_admin = d.pop("is_admin", UNSET) + + edit_workspace_user = cls( + is_admin=is_admin, + ) + + edit_workspace_user.additional_properties = d + return edit_workspace_user + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/exists_username_json_body.py b/python-client/windmill-api/windmill_api/models/exists_username_json_body.py new file mode 100644 index 0000000000..865375ef4d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/exists_username_json_body.py @@ -0,0 +1,64 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ExistsUsernameJsonBody") + + +@attr.s(auto_attribs=True) +class ExistsUsernameJsonBody: + """ + Attributes: + id (str): + username (str): + """ + + id: str + username: str + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + username = self.username + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "username": username, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id") + + username = d.pop("username") + + exists_username_json_body = cls( + id=id, + username=username, + ) + + exists_username_json_body.additional_properties = d + return exists_username_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/exists_workspace_json_body.py b/python-client/windmill-api/windmill_api/models/exists_workspace_json_body.py new file mode 100644 index 0000000000..17656fab2d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/exists_workspace_json_body.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ExistsWorkspaceJsonBody") + + +@attr.s(auto_attribs=True) +class ExistsWorkspaceJsonBody: + """ + Attributes: + id (str): + """ + + id: str + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id") + + exists_workspace_json_body = cls( + id=id, + ) + + exists_workspace_json_body.additional_properties = d + return exists_workspace_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow.py b/python-client/windmill-api/windmill_api/models/flow.py new file mode 100644 index 0000000000..cd4b2b87cb --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow.py @@ -0,0 +1,149 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.flow_extra_perms import FlowExtraPerms +from ..models.flow_schema import FlowSchema +from ..models.flow_value import FlowValue +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Flow") + + +@attr.s(auto_attribs=True) +class Flow: + """ + Attributes: + summary (str): + value (FlowValue): + path (str): + edited_by (str): + edited_at (datetime.datetime): + archived (bool): + extra_perms (FlowExtraPerms): + description (Union[Unset, str]): + schema (Union[Unset, FlowSchema]): + workspace_id (Union[Unset, str]): + additional_properties (Union[Unset, bool]): + """ + + summary: str + value: FlowValue + path: str + edited_by: str + edited_at: datetime.datetime + archived: bool + extra_perms: FlowExtraPerms + description: Union[Unset, str] = UNSET + schema: Union[Unset, FlowSchema] = UNSET + workspace_id: Union[Unset, str] = UNSET + additional_properties: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + summary = self.summary + value = self.value.to_dict() + + path = self.path + edited_by = self.edited_by + edited_at = self.edited_at.isoformat() + + archived = self.archived + extra_perms = self.extra_perms.to_dict() + + description = self.description + schema: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.schema, Unset): + schema = self.schema.to_dict() + + workspace_id = self.workspace_id + additional_properties = self.additional_properties + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "summary": summary, + "value": value, + "path": path, + "edited_by": edited_by, + "edited_at": edited_at, + "archived": archived, + "extra_perms": extra_perms, + } + ) + if description is not UNSET: + field_dict["description"] = description + if schema is not UNSET: + field_dict["schema"] = schema + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if additional_properties is not UNSET: + field_dict["additionalProperties"] = additional_properties + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + summary = d.pop("summary") + + value = FlowValue.from_dict(d.pop("value")) + + path = d.pop("path") + + edited_by = d.pop("edited_by") + + edited_at = isoparse(d.pop("edited_at")) + + archived = d.pop("archived") + + extra_perms = FlowExtraPerms.from_dict(d.pop("extra_perms")) + + description = d.pop("description", UNSET) + + _schema = d.pop("schema", UNSET) + schema: Union[Unset, FlowSchema] + if isinstance(_schema, Unset): + schema = UNSET + else: + schema = FlowSchema.from_dict(_schema) + + workspace_id = d.pop("workspace_id", UNSET) + + additional_properties = d.pop("additionalProperties", UNSET) + + flow = cls( + summary=summary, + value=value, + path=path, + edited_by=edited_by, + edited_at=edited_at, + archived=archived, + extra_perms=extra_perms, + description=description, + schema=schema, + workspace_id=workspace_id, + additional_properties=additional_properties, + ) + + flow.additional_properties = d + return flow + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_extra_perms.py b/python-client/windmill-api/windmill_api/models/flow_extra_perms.py new file mode 100644 index 0000000000..e0c3e00826 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_extra_perms.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="FlowExtraPerms") + + +@attr.s(auto_attribs=True) +class FlowExtraPerms: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + flow_extra_perms = cls() + + flow_extra_perms.additional_properties = d + return flow_extra_perms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_metadata.py b/python-client/windmill-api/windmill_api/models/flow_metadata.py new file mode 100644 index 0000000000..d23803c793 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_metadata.py @@ -0,0 +1,108 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.flow_metadata_extra_perms import FlowMetadataExtraPerms +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowMetadata") + + +@attr.s(auto_attribs=True) +class FlowMetadata: + """ + Attributes: + path (str): + edited_by (str): + edited_at (datetime.datetime): + archived (bool): + extra_perms (FlowMetadataExtraPerms): + workspace_id (Union[Unset, str]): + additional_properties (Union[Unset, bool]): + """ + + path: str + edited_by: str + edited_at: datetime.datetime + archived: bool + extra_perms: FlowMetadataExtraPerms + workspace_id: Union[Unset, str] = UNSET + additional_properties: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + edited_by = self.edited_by + edited_at = self.edited_at.isoformat() + + archived = self.archived + extra_perms = self.extra_perms.to_dict() + + workspace_id = self.workspace_id + additional_properties = self.additional_properties + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "edited_by": edited_by, + "edited_at": edited_at, + "archived": archived, + "extra_perms": extra_perms, + } + ) + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if additional_properties is not UNSET: + field_dict["additionalProperties"] = additional_properties + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + edited_by = d.pop("edited_by") + + edited_at = isoparse(d.pop("edited_at")) + + archived = d.pop("archived") + + extra_perms = FlowMetadataExtraPerms.from_dict(d.pop("extra_perms")) + + workspace_id = d.pop("workspace_id", UNSET) + + additional_properties = d.pop("additionalProperties", UNSET) + + flow_metadata = cls( + path=path, + edited_by=edited_by, + edited_at=edited_at, + archived=archived, + extra_perms=extra_perms, + workspace_id=workspace_id, + additional_properties=additional_properties, + ) + + flow_metadata.additional_properties = d + return flow_metadata + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_metadata_extra_perms.py b/python-client/windmill-api/windmill_api/models/flow_metadata_extra_perms.py new file mode 100644 index 0000000000..e8afae92f7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_metadata_extra_perms.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="FlowMetadataExtraPerms") + + +@attr.s(auto_attribs=True) +class FlowMetadataExtraPerms: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + flow_metadata_extra_perms = cls() + + flow_metadata_extra_perms.additional_properties = d + return flow_metadata_extra_perms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_module.py b/python-client/windmill-api/windmill_api/models/flow_module.py new file mode 100644 index 0000000000..e42a611b45 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module.py @@ -0,0 +1,215 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_module_input_transforms import FlowModuleInputTransforms +from ..models.flow_module_retry import FlowModuleRetry +from ..models.flow_module_sleep_type_0 import FlowModuleSleepType0 +from ..models.flow_module_sleep_type_1 import FlowModuleSleepType1 +from ..models.flow_module_stop_after_if import FlowModuleStopAfterIf +from ..models.flow_module_value_type_0 import FlowModuleValueType0 +from ..models.flow_module_value_type_1 import FlowModuleValueType1 +from ..models.flow_module_value_type_2 import FlowModuleValueType2 +from ..models.flow_module_value_type_3 import FlowModuleValueType3 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowModule") + + +@attr.s(auto_attribs=True) +class FlowModule: + """ + Attributes: + input_transforms (FlowModuleInputTransforms): + value (Union[FlowModuleValueType0, FlowModuleValueType1, FlowModuleValueType2, FlowModuleValueType3]): + stop_after_if (Union[Unset, FlowModuleStopAfterIf]): + sleep (Union[FlowModuleSleepType0, FlowModuleSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, FlowModuleRetry]): + """ + + input_transforms: FlowModuleInputTransforms + value: Union[FlowModuleValueType0, FlowModuleValueType1, FlowModuleValueType2, FlowModuleValueType3] + stop_after_if: Union[Unset, FlowModuleStopAfterIf] = UNSET + sleep: Union[FlowModuleSleepType0, FlowModuleSleepType1, Unset] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, FlowModuleRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, FlowModuleValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, FlowModuleValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, FlowModuleValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, FlowModuleSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = FlowModuleInputTransforms.from_dict(d.pop("input_transforms")) + + def _parse_value( + data: object, + ) -> Union[FlowModuleValueType0, FlowModuleValueType1, FlowModuleValueType2, FlowModuleValueType3]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = FlowModuleValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = FlowModuleValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = FlowModuleValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = FlowModuleValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, FlowModuleStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = FlowModuleStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep(data: object) -> Union[FlowModuleSleepType0, FlowModuleSleepType1, Unset]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, FlowModuleSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = FlowModuleSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, FlowModuleSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = FlowModuleSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, FlowModuleRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = FlowModuleRetry.from_dict(_retry) + + flow_module = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + flow_module.additional_properties = d + return flow_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_module_input_transforms.py b/python-client/windmill-api/windmill_api/models/flow_module_input_transforms.py new file mode 100644 index 0000000000..781555583a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_input_transforms.py @@ -0,0 +1,94 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_module_input_transforms_additional_property_type_0 import ( + FlowModuleInputTransformsAdditionalPropertyType0, +) +from ..models.flow_module_input_transforms_additional_property_type_1 import ( + FlowModuleInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="FlowModuleInputTransforms") + + +@attr.s(auto_attribs=True) +class FlowModuleInputTransforms: + """ """ + + additional_properties: Dict[ + str, Union[FlowModuleInputTransformsAdditionalPropertyType0, FlowModuleInputTransformsAdditionalPropertyType1] + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, FlowModuleInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + flow_module_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + FlowModuleInputTransformsAdditionalPropertyType0, FlowModuleInputTransformsAdditionalPropertyType1 + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = FlowModuleInputTransformsAdditionalPropertyType0.from_dict(data) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = FlowModuleInputTransformsAdditionalPropertyType1.from_dict(data) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + flow_module_input_transforms.additional_properties = additional_properties + return flow_module_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[FlowModuleInputTransformsAdditionalPropertyType0, FlowModuleInputTransformsAdditionalPropertyType1]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + FlowModuleInputTransformsAdditionalPropertyType0, FlowModuleInputTransformsAdditionalPropertyType1 + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_module_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/flow_module_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..097ee2b8ea --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_input_transforms_additional_property_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_module_input_transforms_additional_property_type_0_type import ( + FlowModuleInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowModuleInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class FlowModuleInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (FlowModuleInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: FlowModuleInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = FlowModuleInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + flow_module_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + flow_module_input_transforms_additional_property_type_0.additional_properties = d + return flow_module_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_module_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/flow_module_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..102523f2e4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowModuleInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_module_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/flow_module_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..fdd80fb59a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_input_transforms_additional_property_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.flow_module_input_transforms_additional_property_type_1_type import ( + FlowModuleInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="FlowModuleInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class FlowModuleInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (FlowModuleInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: FlowModuleInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = FlowModuleInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + flow_module_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + flow_module_input_transforms_additional_property_type_1.additional_properties = d + return flow_module_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_module_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/flow_module_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..fc781ea680 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowModuleInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_module_retry.py b/python-client/windmill-api/windmill_api/models/flow_module_retry.py new file mode 100644 index 0000000000..9fe6907a50 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_retry.py @@ -0,0 +1,82 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_module_retry_constant import FlowModuleRetryConstant +from ..models.flow_module_retry_exponential import FlowModuleRetryExponential +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowModuleRetry") + + +@attr.s(auto_attribs=True) +class FlowModuleRetry: + """ + Attributes: + constant (Union[Unset, FlowModuleRetryConstant]): + exponential (Union[Unset, FlowModuleRetryExponential]): + """ + + constant: Union[Unset, FlowModuleRetryConstant] = UNSET + exponential: Union[Unset, FlowModuleRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, FlowModuleRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = FlowModuleRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, FlowModuleRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = FlowModuleRetryExponential.from_dict(_exponential) + + flow_module_retry = cls( + constant=constant, + exponential=exponential, + ) + + flow_module_retry.additional_properties = d + return flow_module_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_module_retry_constant.py b/python-client/windmill-api/windmill_api/models/flow_module_retry_constant.py new file mode 100644 index 0000000000..73b81645b6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowModuleRetryConstant") + + +@attr.s(auto_attribs=True) +class FlowModuleRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + flow_module_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + flow_module_retry_constant.additional_properties = d + return flow_module_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_module_retry_exponential.py b/python-client/windmill-api/windmill_api/models/flow_module_retry_exponential.py new file mode 100644 index 0000000000..abb90aaa91 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowModuleRetryExponential") + + +@attr.s(auto_attribs=True) +class FlowModuleRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + flow_module_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + flow_module_retry_exponential.additional_properties = d + return flow_module_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_module_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/flow_module_sleep_type_0.py new file mode 100644 index 0000000000..d6b89d155a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_sleep_type_0.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_module_sleep_type_0_type import FlowModuleSleepType0Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowModuleSleepType0") + + +@attr.s(auto_attribs=True) +class FlowModuleSleepType0: + """ + Attributes: + type (FlowModuleSleepType0Type): + value (Union[Unset, Any]): + """ + + type: FlowModuleSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = FlowModuleSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + flow_module_sleep_type_0 = cls( + type=type, + value=value, + ) + + flow_module_sleep_type_0.additional_properties = d + return flow_module_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_module_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/flow_module_sleep_type_0_type.py new file mode 100644 index 0000000000..a4fd8d1d73 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowModuleSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_module_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/flow_module_sleep_type_1.py new file mode 100644 index 0000000000..59b5c7a008 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_sleep_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.flow_module_sleep_type_1_type import FlowModuleSleepType1Type + +T = TypeVar("T", bound="FlowModuleSleepType1") + + +@attr.s(auto_attribs=True) +class FlowModuleSleepType1: + """ + Attributes: + expr (str): + type (FlowModuleSleepType1Type): + """ + + expr: str + type: FlowModuleSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = FlowModuleSleepType1Type(d.pop("type")) + + flow_module_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + flow_module_sleep_type_1.additional_properties = d + return flow_module_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_module_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/flow_module_sleep_type_1_type.py new file mode 100644 index 0000000000..390daf3bdd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowModuleSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_module_stop_after_if.py b/python-client/windmill-api/windmill_api/models/flow_module_stop_after_if.py new file mode 100644 index 0000000000..37e2cbc8b2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowModuleStopAfterIf") + + +@attr.s(auto_attribs=True) +class FlowModuleStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + flow_module_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + flow_module_stop_after_if.additional_properties = d + return flow_module_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_module_value_type_0.py b/python-client/windmill-api/windmill_api/models/flow_module_value_type_0.py new file mode 100644 index 0000000000..ded5fa7d4c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_value_type_0.py @@ -0,0 +1,83 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_module_value_type_0_language import FlowModuleValueType0Language +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowModuleValueType0") + + +@attr.s(auto_attribs=True) +class FlowModuleValueType0: + """ + Attributes: + content (str): + language (FlowModuleValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: FlowModuleValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = FlowModuleValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + flow_module_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + flow_module_value_type_0.additional_properties = d + return flow_module_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_module_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/flow_module_value_type_0_language.py new file mode 100644 index 0000000000..4ffb0fd5fb --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class FlowModuleValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_module_value_type_1.py b/python-client/windmill-api/windmill_api/models/flow_module_value_type_1.py new file mode 100644 index 0000000000..7d23cf4fdc --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_value_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.flow_module_value_type_1_type import FlowModuleValueType1Type + +T = TypeVar("T", bound="FlowModuleValueType1") + + +@attr.s(auto_attribs=True) +class FlowModuleValueType1: + """ + Attributes: + path (str): + type (FlowModuleValueType1Type): + """ + + path: str + type: FlowModuleValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = FlowModuleValueType1Type(d.pop("type")) + + flow_module_value_type_1 = cls( + path=path, + type=type, + ) + + flow_module_value_type_1.additional_properties = d + return flow_module_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_module_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/flow_module_value_type_1_type.py new file mode 100644 index 0000000000..70e0066895 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowModuleValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_module_value_type_2.py b/python-client/windmill-api/windmill_api/models/flow_module_value_type_2.py new file mode 100644 index 0000000000..f3f7a07e91 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_value_type_2.py @@ -0,0 +1,99 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_module_value_type_2_iterator_type_0 import FlowModuleValueType2IteratorType0 +from ..models.flow_module_value_type_2_iterator_type_1 import FlowModuleValueType2IteratorType1 +from ..models.flow_module_value_type_2_type import FlowModuleValueType2Type + +T = TypeVar("T", bound="FlowModuleValueType2") + + +@attr.s(auto_attribs=True) +class FlowModuleValueType2: + """ + Attributes: + iterator (Union[FlowModuleValueType2IteratorType0, FlowModuleValueType2IteratorType1]): + skip_failures (bool): + type (FlowModuleValueType2Type): + """ + + iterator: Union[FlowModuleValueType2IteratorType0, FlowModuleValueType2IteratorType1] + skip_failures: bool + type: FlowModuleValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, FlowModuleValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[FlowModuleValueType2IteratorType0, FlowModuleValueType2IteratorType1]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = FlowModuleValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = FlowModuleValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = FlowModuleValueType2Type(d.pop("type")) + + flow_module_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + flow_module_value_type_2.additional_properties = d + return flow_module_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_module_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/flow_module_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..757ebdf023 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_value_type_2_iterator_type_0.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_module_value_type_2_iterator_type_0_type import FlowModuleValueType2IteratorType0Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowModuleValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class FlowModuleValueType2IteratorType0: + """ + Attributes: + type (FlowModuleValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: FlowModuleValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = FlowModuleValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + flow_module_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + flow_module_value_type_2_iterator_type_0.additional_properties = d + return flow_module_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_module_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/flow_module_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..dbf9278e98 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowModuleValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_module_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/flow_module_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..ea53988118 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_value_type_2_iterator_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.flow_module_value_type_2_iterator_type_1_type import FlowModuleValueType2IteratorType1Type + +T = TypeVar("T", bound="FlowModuleValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class FlowModuleValueType2IteratorType1: + """ + Attributes: + expr (str): + type (FlowModuleValueType2IteratorType1Type): + """ + + expr: str + type: FlowModuleValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = FlowModuleValueType2IteratorType1Type(d.pop("type")) + + flow_module_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + flow_module_value_type_2_iterator_type_1.additional_properties = d + return flow_module_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_module_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/flow_module_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..2acc867cfc --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowModuleValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_module_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/flow_module_value_type_2_type.py new file mode 100644 index 0000000000..8d1be44216 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowModuleValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_module_value_type_3.py b/python-client/windmill-api/windmill_api/models/flow_module_value_type_3.py new file mode 100644 index 0000000000..420b27a971 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_value_type_3.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_module_value_type_3_type import FlowModuleValueType3Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowModuleValueType3") + + +@attr.s(auto_attribs=True) +class FlowModuleValueType3: + """ + Attributes: + type (FlowModuleValueType3Type): + path (Union[Unset, str]): + """ + + type: FlowModuleValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = FlowModuleValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + flow_module_value_type_3 = cls( + type=type, + path=path, + ) + + flow_module_value_type_3.additional_properties = d + return flow_module_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_module_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/flow_module_value_type_3_type.py new file mode 100644 index 0000000000..cea8232723 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_module_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowModuleValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_preview.py b/python-client/windmill-api/windmill_api/models/flow_preview.py new file mode 100644 index 0000000000..5e67999bcf --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview.py @@ -0,0 +1,78 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_preview_args import FlowPreviewArgs +from ..models.flow_preview_value import FlowPreviewValue +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowPreview") + + +@attr.s(auto_attribs=True) +class FlowPreview: + """ + Attributes: + value (FlowPreviewValue): + args (FlowPreviewArgs): + path (Union[Unset, str]): + """ + + value: FlowPreviewValue + args: FlowPreviewArgs + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + value = self.value.to_dict() + + args = self.args.to_dict() + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "value": value, + "args": args, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + value = FlowPreviewValue.from_dict(d.pop("value")) + + args = FlowPreviewArgs.from_dict(d.pop("args")) + + path = d.pop("path", UNSET) + + flow_preview = cls( + value=value, + args=args, + path=path, + ) + + flow_preview.additional_properties = d + return flow_preview + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_args.py b/python-client/windmill-api/windmill_api/models/flow_preview_args.py new file mode 100644 index 0000000000..b0a1868809 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_args.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="FlowPreviewArgs") + + +@attr.s(auto_attribs=True) +class FlowPreviewArgs: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + flow_preview_args = cls() + + flow_preview_args.additional_properties = d + return flow_preview_args + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value.py b/python-client/windmill-api/windmill_api/models/flow_preview_value.py new file mode 100644 index 0000000000..925a7f8cf6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value.py @@ -0,0 +1,95 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_preview_value_failure_module import FlowPreviewValueFailureModule +from ..models.flow_preview_value_modules_item import FlowPreviewValueModulesItem +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowPreviewValue") + + +@attr.s(auto_attribs=True) +class FlowPreviewValue: + """ + Attributes: + modules (List[FlowPreviewValueModulesItem]): + failure_module (Union[Unset, FlowPreviewValueFailureModule]): + same_worker (Union[Unset, bool]): + """ + + modules: List[FlowPreviewValueModulesItem] + failure_module: Union[Unset, FlowPreviewValueFailureModule] = UNSET + same_worker: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + modules = [] + for modules_item_data in self.modules: + modules_item = modules_item_data.to_dict() + + modules.append(modules_item) + + failure_module: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.failure_module, Unset): + failure_module = self.failure_module.to_dict() + + same_worker = self.same_worker + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "modules": modules, + } + ) + if failure_module is not UNSET: + field_dict["failure_module"] = failure_module + if same_worker is not UNSET: + field_dict["same_worker"] = same_worker + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + modules = [] + _modules = d.pop("modules") + for modules_item_data in _modules: + modules_item = FlowPreviewValueModulesItem.from_dict(modules_item_data) + + modules.append(modules_item) + + _failure_module = d.pop("failure_module", UNSET) + failure_module: Union[Unset, FlowPreviewValueFailureModule] + if isinstance(_failure_module, Unset): + failure_module = UNSET + else: + failure_module = FlowPreviewValueFailureModule.from_dict(_failure_module) + + same_worker = d.pop("same_worker", UNSET) + + flow_preview_value = cls( + modules=modules, + failure_module=failure_module, + same_worker=same_worker, + ) + + flow_preview_value.additional_properties = d + return flow_preview_value + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module.py new file mode 100644 index 0000000000..fa7bef8133 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module.py @@ -0,0 +1,228 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_preview_value_failure_module_input_transforms import FlowPreviewValueFailureModuleInputTransforms +from ..models.flow_preview_value_failure_module_retry import FlowPreviewValueFailureModuleRetry +from ..models.flow_preview_value_failure_module_sleep_type_0 import FlowPreviewValueFailureModuleSleepType0 +from ..models.flow_preview_value_failure_module_sleep_type_1 import FlowPreviewValueFailureModuleSleepType1 +from ..models.flow_preview_value_failure_module_stop_after_if import FlowPreviewValueFailureModuleStopAfterIf +from ..models.flow_preview_value_failure_module_value_type_0 import FlowPreviewValueFailureModuleValueType0 +from ..models.flow_preview_value_failure_module_value_type_1 import FlowPreviewValueFailureModuleValueType1 +from ..models.flow_preview_value_failure_module_value_type_2 import FlowPreviewValueFailureModuleValueType2 +from ..models.flow_preview_value_failure_module_value_type_3 import FlowPreviewValueFailureModuleValueType3 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowPreviewValueFailureModule") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueFailureModule: + """ + Attributes: + input_transforms (FlowPreviewValueFailureModuleInputTransforms): + value (Union[FlowPreviewValueFailureModuleValueType0, FlowPreviewValueFailureModuleValueType1, + FlowPreviewValueFailureModuleValueType2, FlowPreviewValueFailureModuleValueType3]): + stop_after_if (Union[Unset, FlowPreviewValueFailureModuleStopAfterIf]): + sleep (Union[FlowPreviewValueFailureModuleSleepType0, FlowPreviewValueFailureModuleSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, FlowPreviewValueFailureModuleRetry]): + """ + + input_transforms: FlowPreviewValueFailureModuleInputTransforms + value: Union[ + FlowPreviewValueFailureModuleValueType0, + FlowPreviewValueFailureModuleValueType1, + FlowPreviewValueFailureModuleValueType2, + FlowPreviewValueFailureModuleValueType3, + ] + stop_after_if: Union[Unset, FlowPreviewValueFailureModuleStopAfterIf] = UNSET + sleep: Union[FlowPreviewValueFailureModuleSleepType0, FlowPreviewValueFailureModuleSleepType1, Unset] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, FlowPreviewValueFailureModuleRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, FlowPreviewValueFailureModuleValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, FlowPreviewValueFailureModuleValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, FlowPreviewValueFailureModuleValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, FlowPreviewValueFailureModuleSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = FlowPreviewValueFailureModuleInputTransforms.from_dict(d.pop("input_transforms")) + + def _parse_value( + data: object, + ) -> Union[ + FlowPreviewValueFailureModuleValueType0, + FlowPreviewValueFailureModuleValueType1, + FlowPreviewValueFailureModuleValueType2, + FlowPreviewValueFailureModuleValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = FlowPreviewValueFailureModuleValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = FlowPreviewValueFailureModuleValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = FlowPreviewValueFailureModuleValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = FlowPreviewValueFailureModuleValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, FlowPreviewValueFailureModuleStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = FlowPreviewValueFailureModuleStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[FlowPreviewValueFailureModuleSleepType0, FlowPreviewValueFailureModuleSleepType1, Unset]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, FlowPreviewValueFailureModuleSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = FlowPreviewValueFailureModuleSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, FlowPreviewValueFailureModuleSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = FlowPreviewValueFailureModuleSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, FlowPreviewValueFailureModuleRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = FlowPreviewValueFailureModuleRetry.from_dict(_retry) + + flow_preview_value_failure_module = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + flow_preview_value_failure_module.additional_properties = d + return flow_preview_value_failure_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_input_transforms.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_input_transforms.py new file mode 100644 index 0000000000..76f0ee9252 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_input_transforms.py @@ -0,0 +1,107 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_preview_value_failure_module_input_transforms_additional_property_type_0 import ( + FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType0, +) +from ..models.flow_preview_value_failure_module_input_transforms_additional_property_type_1 import ( + FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="FlowPreviewValueFailureModuleInputTransforms") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueFailureModuleInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType0, + FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + flow_preview_value_failure_module_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType0, + FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType0.from_dict(data) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType1.from_dict(data) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + flow_preview_value_failure_module_input_transforms.additional_properties = additional_properties + return flow_preview_value_failure_module_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType0, + FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType0, + FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..e91c54deb1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_input_transforms_additional_property_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_preview_value_failure_module_input_transforms_additional_property_type_0_type import ( + FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + flow_preview_value_failure_module_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + flow_preview_value_failure_module_input_transforms_additional_property_type_0.additional_properties = d + return flow_preview_value_failure_module_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..ca37db3fa8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..b60e096838 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_input_transforms_additional_property_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.flow_preview_value_failure_module_input_transforms_additional_property_type_1_type import ( + FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + flow_preview_value_failure_module_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + flow_preview_value_failure_module_input_transforms_additional_property_type_1.additional_properties = d + return flow_preview_value_failure_module_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..524596ebf9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowPreviewValueFailureModuleInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_retry.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_retry.py new file mode 100644 index 0000000000..a96d87b8bc --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_retry.py @@ -0,0 +1,82 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_preview_value_failure_module_retry_constant import FlowPreviewValueFailureModuleRetryConstant +from ..models.flow_preview_value_failure_module_retry_exponential import FlowPreviewValueFailureModuleRetryExponential +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowPreviewValueFailureModuleRetry") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueFailureModuleRetry: + """ + Attributes: + constant (Union[Unset, FlowPreviewValueFailureModuleRetryConstant]): + exponential (Union[Unset, FlowPreviewValueFailureModuleRetryExponential]): + """ + + constant: Union[Unset, FlowPreviewValueFailureModuleRetryConstant] = UNSET + exponential: Union[Unset, FlowPreviewValueFailureModuleRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, FlowPreviewValueFailureModuleRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = FlowPreviewValueFailureModuleRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, FlowPreviewValueFailureModuleRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = FlowPreviewValueFailureModuleRetryExponential.from_dict(_exponential) + + flow_preview_value_failure_module_retry = cls( + constant=constant, + exponential=exponential, + ) + + flow_preview_value_failure_module_retry.additional_properties = d + return flow_preview_value_failure_module_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_retry_constant.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_retry_constant.py new file mode 100644 index 0000000000..60f36d79f4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowPreviewValueFailureModuleRetryConstant") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueFailureModuleRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + flow_preview_value_failure_module_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + flow_preview_value_failure_module_retry_constant.additional_properties = d + return flow_preview_value_failure_module_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_retry_exponential.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_retry_exponential.py new file mode 100644 index 0000000000..5e44220f6d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowPreviewValueFailureModuleRetryExponential") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueFailureModuleRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + flow_preview_value_failure_module_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + flow_preview_value_failure_module_retry_exponential.additional_properties = d + return flow_preview_value_failure_module_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_sleep_type_0.py new file mode 100644 index 0000000000..d7bf03d86d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_sleep_type_0.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_preview_value_failure_module_sleep_type_0_type import FlowPreviewValueFailureModuleSleepType0Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowPreviewValueFailureModuleSleepType0") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueFailureModuleSleepType0: + """ + Attributes: + type (FlowPreviewValueFailureModuleSleepType0Type): + value (Union[Unset, Any]): + """ + + type: FlowPreviewValueFailureModuleSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = FlowPreviewValueFailureModuleSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + flow_preview_value_failure_module_sleep_type_0 = cls( + type=type, + value=value, + ) + + flow_preview_value_failure_module_sleep_type_0.additional_properties = d + return flow_preview_value_failure_module_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_sleep_type_0_type.py new file mode 100644 index 0000000000..4b3c9ece88 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowPreviewValueFailureModuleSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_sleep_type_1.py new file mode 100644 index 0000000000..e5ad80120f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_sleep_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.flow_preview_value_failure_module_sleep_type_1_type import FlowPreviewValueFailureModuleSleepType1Type + +T = TypeVar("T", bound="FlowPreviewValueFailureModuleSleepType1") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueFailureModuleSleepType1: + """ + Attributes: + expr (str): + type (FlowPreviewValueFailureModuleSleepType1Type): + """ + + expr: str + type: FlowPreviewValueFailureModuleSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = FlowPreviewValueFailureModuleSleepType1Type(d.pop("type")) + + flow_preview_value_failure_module_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + flow_preview_value_failure_module_sleep_type_1.additional_properties = d + return flow_preview_value_failure_module_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_sleep_type_1_type.py new file mode 100644 index 0000000000..31c89b3e09 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowPreviewValueFailureModuleSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_stop_after_if.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_stop_after_if.py new file mode 100644 index 0000000000..8316253f1f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowPreviewValueFailureModuleStopAfterIf") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueFailureModuleStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + flow_preview_value_failure_module_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + flow_preview_value_failure_module_stop_after_if.additional_properties = d + return flow_preview_value_failure_module_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_0.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_0.py new file mode 100644 index 0000000000..5ad4cd05f8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_preview_value_failure_module_value_type_0_language import ( + FlowPreviewValueFailureModuleValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowPreviewValueFailureModuleValueType0") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueFailureModuleValueType0: + """ + Attributes: + content (str): + language (FlowPreviewValueFailureModuleValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: FlowPreviewValueFailureModuleValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = FlowPreviewValueFailureModuleValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + flow_preview_value_failure_module_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + flow_preview_value_failure_module_value_type_0.additional_properties = d + return flow_preview_value_failure_module_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_0_language.py new file mode 100644 index 0000000000..99a724a3f9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class FlowPreviewValueFailureModuleValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_1.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_1.py new file mode 100644 index 0000000000..9c9c7ad4e0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.flow_preview_value_failure_module_value_type_1_type import FlowPreviewValueFailureModuleValueType1Type + +T = TypeVar("T", bound="FlowPreviewValueFailureModuleValueType1") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueFailureModuleValueType1: + """ + Attributes: + path (str): + type (FlowPreviewValueFailureModuleValueType1Type): + """ + + path: str + type: FlowPreviewValueFailureModuleValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = FlowPreviewValueFailureModuleValueType1Type(d.pop("type")) + + flow_preview_value_failure_module_value_type_1 = cls( + path=path, + type=type, + ) + + flow_preview_value_failure_module_value_type_1.additional_properties = d + return flow_preview_value_failure_module_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_1_type.py new file mode 100644 index 0000000000..8cc9fca366 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowPreviewValueFailureModuleValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2.py new file mode 100644 index 0000000000..1c5cb96b8e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2.py @@ -0,0 +1,108 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_preview_value_failure_module_value_type_2_iterator_type_0 import ( + FlowPreviewValueFailureModuleValueType2IteratorType0, +) +from ..models.flow_preview_value_failure_module_value_type_2_iterator_type_1 import ( + FlowPreviewValueFailureModuleValueType2IteratorType1, +) +from ..models.flow_preview_value_failure_module_value_type_2_type import FlowPreviewValueFailureModuleValueType2Type + +T = TypeVar("T", bound="FlowPreviewValueFailureModuleValueType2") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueFailureModuleValueType2: + """ + Attributes: + iterator (Union[FlowPreviewValueFailureModuleValueType2IteratorType0, + FlowPreviewValueFailureModuleValueType2IteratorType1]): + skip_failures (bool): + type (FlowPreviewValueFailureModuleValueType2Type): + """ + + iterator: Union[ + FlowPreviewValueFailureModuleValueType2IteratorType0, FlowPreviewValueFailureModuleValueType2IteratorType1 + ] + skip_failures: bool + type: FlowPreviewValueFailureModuleValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, FlowPreviewValueFailureModuleValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + FlowPreviewValueFailureModuleValueType2IteratorType0, FlowPreviewValueFailureModuleValueType2IteratorType1 + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = FlowPreviewValueFailureModuleValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = FlowPreviewValueFailureModuleValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = FlowPreviewValueFailureModuleValueType2Type(d.pop("type")) + + flow_preview_value_failure_module_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + flow_preview_value_failure_module_value_type_2.additional_properties = d + return flow_preview_value_failure_module_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..376a59d41a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_preview_value_failure_module_value_type_2_iterator_type_0_type import ( + FlowPreviewValueFailureModuleValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowPreviewValueFailureModuleValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueFailureModuleValueType2IteratorType0: + """ + Attributes: + type (FlowPreviewValueFailureModuleValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: FlowPreviewValueFailureModuleValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = FlowPreviewValueFailureModuleValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + flow_preview_value_failure_module_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + flow_preview_value_failure_module_value_type_2_iterator_type_0.additional_properties = d + return flow_preview_value_failure_module_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..bd0e8b541c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowPreviewValueFailureModuleValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..64d60598b8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.flow_preview_value_failure_module_value_type_2_iterator_type_1_type import ( + FlowPreviewValueFailureModuleValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="FlowPreviewValueFailureModuleValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueFailureModuleValueType2IteratorType1: + """ + Attributes: + expr (str): + type (FlowPreviewValueFailureModuleValueType2IteratorType1Type): + """ + + expr: str + type: FlowPreviewValueFailureModuleValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = FlowPreviewValueFailureModuleValueType2IteratorType1Type(d.pop("type")) + + flow_preview_value_failure_module_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + flow_preview_value_failure_module_value_type_2_iterator_type_1.additional_properties = d + return flow_preview_value_failure_module_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..d7bcb5a844 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowPreviewValueFailureModuleValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2_type.py new file mode 100644 index 0000000000..f1b3d0a4f7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowPreviewValueFailureModuleValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_3.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_3.py new file mode 100644 index 0000000000..fd980e30cd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_3.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_preview_value_failure_module_value_type_3_type import FlowPreviewValueFailureModuleValueType3Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowPreviewValueFailureModuleValueType3") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueFailureModuleValueType3: + """ + Attributes: + type (FlowPreviewValueFailureModuleValueType3Type): + path (Union[Unset, str]): + """ + + type: FlowPreviewValueFailureModuleValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = FlowPreviewValueFailureModuleValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + flow_preview_value_failure_module_value_type_3 = cls( + type=type, + path=path, + ) + + flow_preview_value_failure_module_value_type_3.additional_properties = d + return flow_preview_value_failure_module_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_3_type.py new file mode 100644 index 0000000000..df00154bee --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_failure_module_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowPreviewValueFailureModuleValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item.py new file mode 100644 index 0000000000..557a0a67cf --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item.py @@ -0,0 +1,228 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_preview_value_modules_item_input_transforms import FlowPreviewValueModulesItemInputTransforms +from ..models.flow_preview_value_modules_item_retry import FlowPreviewValueModulesItemRetry +from ..models.flow_preview_value_modules_item_sleep_type_0 import FlowPreviewValueModulesItemSleepType0 +from ..models.flow_preview_value_modules_item_sleep_type_1 import FlowPreviewValueModulesItemSleepType1 +from ..models.flow_preview_value_modules_item_stop_after_if import FlowPreviewValueModulesItemStopAfterIf +from ..models.flow_preview_value_modules_item_value_type_0 import FlowPreviewValueModulesItemValueType0 +from ..models.flow_preview_value_modules_item_value_type_1 import FlowPreviewValueModulesItemValueType1 +from ..models.flow_preview_value_modules_item_value_type_2 import FlowPreviewValueModulesItemValueType2 +from ..models.flow_preview_value_modules_item_value_type_3 import FlowPreviewValueModulesItemValueType3 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowPreviewValueModulesItem") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueModulesItem: + """ + Attributes: + input_transforms (FlowPreviewValueModulesItemInputTransforms): + value (Union[FlowPreviewValueModulesItemValueType0, FlowPreviewValueModulesItemValueType1, + FlowPreviewValueModulesItemValueType2, FlowPreviewValueModulesItemValueType3]): + stop_after_if (Union[Unset, FlowPreviewValueModulesItemStopAfterIf]): + sleep (Union[FlowPreviewValueModulesItemSleepType0, FlowPreviewValueModulesItemSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, FlowPreviewValueModulesItemRetry]): + """ + + input_transforms: FlowPreviewValueModulesItemInputTransforms + value: Union[ + FlowPreviewValueModulesItemValueType0, + FlowPreviewValueModulesItemValueType1, + FlowPreviewValueModulesItemValueType2, + FlowPreviewValueModulesItemValueType3, + ] + stop_after_if: Union[Unset, FlowPreviewValueModulesItemStopAfterIf] = UNSET + sleep: Union[FlowPreviewValueModulesItemSleepType0, FlowPreviewValueModulesItemSleepType1, Unset] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, FlowPreviewValueModulesItemRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, FlowPreviewValueModulesItemValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, FlowPreviewValueModulesItemValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, FlowPreviewValueModulesItemValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, FlowPreviewValueModulesItemSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = FlowPreviewValueModulesItemInputTransforms.from_dict(d.pop("input_transforms")) + + def _parse_value( + data: object, + ) -> Union[ + FlowPreviewValueModulesItemValueType0, + FlowPreviewValueModulesItemValueType1, + FlowPreviewValueModulesItemValueType2, + FlowPreviewValueModulesItemValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = FlowPreviewValueModulesItemValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = FlowPreviewValueModulesItemValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = FlowPreviewValueModulesItemValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = FlowPreviewValueModulesItemValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, FlowPreviewValueModulesItemStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = FlowPreviewValueModulesItemStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[FlowPreviewValueModulesItemSleepType0, FlowPreviewValueModulesItemSleepType1, Unset]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, FlowPreviewValueModulesItemSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = FlowPreviewValueModulesItemSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, FlowPreviewValueModulesItemSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = FlowPreviewValueModulesItemSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, FlowPreviewValueModulesItemRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = FlowPreviewValueModulesItemRetry.from_dict(_retry) + + flow_preview_value_modules_item = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + flow_preview_value_modules_item.additional_properties = d + return flow_preview_value_modules_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_input_transforms.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_input_transforms.py new file mode 100644 index 0000000000..44bea24a59 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_input_transforms.py @@ -0,0 +1,107 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_preview_value_modules_item_input_transforms_additional_property_type_0 import ( + FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType0, +) +from ..models.flow_preview_value_modules_item_input_transforms_additional_property_type_1 import ( + FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="FlowPreviewValueModulesItemInputTransforms") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueModulesItemInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType0, + FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + flow_preview_value_modules_item_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType0, + FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType0.from_dict(data) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType1.from_dict(data) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + flow_preview_value_modules_item_input_transforms.additional_properties = additional_properties + return flow_preview_value_modules_item_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType0, + FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType0, + FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..12dcb58c21 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_input_transforms_additional_property_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_preview_value_modules_item_input_transforms_additional_property_type_0_type import ( + FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + flow_preview_value_modules_item_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + flow_preview_value_modules_item_input_transforms_additional_property_type_0.additional_properties = d + return flow_preview_value_modules_item_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..49a55511a4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..7acc673995 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_input_transforms_additional_property_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.flow_preview_value_modules_item_input_transforms_additional_property_type_1_type import ( + FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + flow_preview_value_modules_item_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + flow_preview_value_modules_item_input_transforms_additional_property_type_1.additional_properties = d + return flow_preview_value_modules_item_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..bde6e9c063 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowPreviewValueModulesItemInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_retry.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_retry.py new file mode 100644 index 0000000000..7f4b73704b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_retry.py @@ -0,0 +1,82 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_preview_value_modules_item_retry_constant import FlowPreviewValueModulesItemRetryConstant +from ..models.flow_preview_value_modules_item_retry_exponential import FlowPreviewValueModulesItemRetryExponential +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowPreviewValueModulesItemRetry") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueModulesItemRetry: + """ + Attributes: + constant (Union[Unset, FlowPreviewValueModulesItemRetryConstant]): + exponential (Union[Unset, FlowPreviewValueModulesItemRetryExponential]): + """ + + constant: Union[Unset, FlowPreviewValueModulesItemRetryConstant] = UNSET + exponential: Union[Unset, FlowPreviewValueModulesItemRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, FlowPreviewValueModulesItemRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = FlowPreviewValueModulesItemRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, FlowPreviewValueModulesItemRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = FlowPreviewValueModulesItemRetryExponential.from_dict(_exponential) + + flow_preview_value_modules_item_retry = cls( + constant=constant, + exponential=exponential, + ) + + flow_preview_value_modules_item_retry.additional_properties = d + return flow_preview_value_modules_item_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_retry_constant.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_retry_constant.py new file mode 100644 index 0000000000..714e5cda3f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowPreviewValueModulesItemRetryConstant") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueModulesItemRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + flow_preview_value_modules_item_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + flow_preview_value_modules_item_retry_constant.additional_properties = d + return flow_preview_value_modules_item_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_retry_exponential.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_retry_exponential.py new file mode 100644 index 0000000000..3071df33f0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowPreviewValueModulesItemRetryExponential") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueModulesItemRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + flow_preview_value_modules_item_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + flow_preview_value_modules_item_retry_exponential.additional_properties = d + return flow_preview_value_modules_item_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_sleep_type_0.py new file mode 100644 index 0000000000..f3fa6dc54b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_sleep_type_0.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_preview_value_modules_item_sleep_type_0_type import FlowPreviewValueModulesItemSleepType0Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowPreviewValueModulesItemSleepType0") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueModulesItemSleepType0: + """ + Attributes: + type (FlowPreviewValueModulesItemSleepType0Type): + value (Union[Unset, Any]): + """ + + type: FlowPreviewValueModulesItemSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = FlowPreviewValueModulesItemSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + flow_preview_value_modules_item_sleep_type_0 = cls( + type=type, + value=value, + ) + + flow_preview_value_modules_item_sleep_type_0.additional_properties = d + return flow_preview_value_modules_item_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_sleep_type_0_type.py new file mode 100644 index 0000000000..a25f72e610 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowPreviewValueModulesItemSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_sleep_type_1.py new file mode 100644 index 0000000000..9abeab3479 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_sleep_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.flow_preview_value_modules_item_sleep_type_1_type import FlowPreviewValueModulesItemSleepType1Type + +T = TypeVar("T", bound="FlowPreviewValueModulesItemSleepType1") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueModulesItemSleepType1: + """ + Attributes: + expr (str): + type (FlowPreviewValueModulesItemSleepType1Type): + """ + + expr: str + type: FlowPreviewValueModulesItemSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = FlowPreviewValueModulesItemSleepType1Type(d.pop("type")) + + flow_preview_value_modules_item_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + flow_preview_value_modules_item_sleep_type_1.additional_properties = d + return flow_preview_value_modules_item_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_sleep_type_1_type.py new file mode 100644 index 0000000000..ffeb2b9a53 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowPreviewValueModulesItemSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_stop_after_if.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_stop_after_if.py new file mode 100644 index 0000000000..e8a97d9e3e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowPreviewValueModulesItemStopAfterIf") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueModulesItemStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + flow_preview_value_modules_item_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + flow_preview_value_modules_item_stop_after_if.additional_properties = d + return flow_preview_value_modules_item_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_0.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_0.py new file mode 100644 index 0000000000..4ca6d85b57 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_0.py @@ -0,0 +1,83 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_preview_value_modules_item_value_type_0_language import FlowPreviewValueModulesItemValueType0Language +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowPreviewValueModulesItemValueType0") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueModulesItemValueType0: + """ + Attributes: + content (str): + language (FlowPreviewValueModulesItemValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: FlowPreviewValueModulesItemValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = FlowPreviewValueModulesItemValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + flow_preview_value_modules_item_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + flow_preview_value_modules_item_value_type_0.additional_properties = d + return flow_preview_value_modules_item_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_0_language.py new file mode 100644 index 0000000000..92db95d24f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class FlowPreviewValueModulesItemValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_1.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_1.py new file mode 100644 index 0000000000..db81b79696 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.flow_preview_value_modules_item_value_type_1_type import FlowPreviewValueModulesItemValueType1Type + +T = TypeVar("T", bound="FlowPreviewValueModulesItemValueType1") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueModulesItemValueType1: + """ + Attributes: + path (str): + type (FlowPreviewValueModulesItemValueType1Type): + """ + + path: str + type: FlowPreviewValueModulesItemValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = FlowPreviewValueModulesItemValueType1Type(d.pop("type")) + + flow_preview_value_modules_item_value_type_1 = cls( + path=path, + type=type, + ) + + flow_preview_value_modules_item_value_type_1.additional_properties = d + return flow_preview_value_modules_item_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_1_type.py new file mode 100644 index 0000000000..059ef3031c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowPreviewValueModulesItemValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2.py new file mode 100644 index 0000000000..08c64c3067 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2.py @@ -0,0 +1,108 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_preview_value_modules_item_value_type_2_iterator_type_0 import ( + FlowPreviewValueModulesItemValueType2IteratorType0, +) +from ..models.flow_preview_value_modules_item_value_type_2_iterator_type_1 import ( + FlowPreviewValueModulesItemValueType2IteratorType1, +) +from ..models.flow_preview_value_modules_item_value_type_2_type import FlowPreviewValueModulesItemValueType2Type + +T = TypeVar("T", bound="FlowPreviewValueModulesItemValueType2") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueModulesItemValueType2: + """ + Attributes: + iterator (Union[FlowPreviewValueModulesItemValueType2IteratorType0, + FlowPreviewValueModulesItemValueType2IteratorType1]): + skip_failures (bool): + type (FlowPreviewValueModulesItemValueType2Type): + """ + + iterator: Union[ + FlowPreviewValueModulesItemValueType2IteratorType0, FlowPreviewValueModulesItemValueType2IteratorType1 + ] + skip_failures: bool + type: FlowPreviewValueModulesItemValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, FlowPreviewValueModulesItemValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + FlowPreviewValueModulesItemValueType2IteratorType0, FlowPreviewValueModulesItemValueType2IteratorType1 + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = FlowPreviewValueModulesItemValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = FlowPreviewValueModulesItemValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = FlowPreviewValueModulesItemValueType2Type(d.pop("type")) + + flow_preview_value_modules_item_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + flow_preview_value_modules_item_value_type_2.additional_properties = d + return flow_preview_value_modules_item_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..baa2370dc7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_preview_value_modules_item_value_type_2_iterator_type_0_type import ( + FlowPreviewValueModulesItemValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowPreviewValueModulesItemValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueModulesItemValueType2IteratorType0: + """ + Attributes: + type (FlowPreviewValueModulesItemValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: FlowPreviewValueModulesItemValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = FlowPreviewValueModulesItemValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + flow_preview_value_modules_item_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + flow_preview_value_modules_item_value_type_2_iterator_type_0.additional_properties = d + return flow_preview_value_modules_item_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..9c3b39ed73 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowPreviewValueModulesItemValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..061999a7ce --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.flow_preview_value_modules_item_value_type_2_iterator_type_1_type import ( + FlowPreviewValueModulesItemValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="FlowPreviewValueModulesItemValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueModulesItemValueType2IteratorType1: + """ + Attributes: + expr (str): + type (FlowPreviewValueModulesItemValueType2IteratorType1Type): + """ + + expr: str + type: FlowPreviewValueModulesItemValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = FlowPreviewValueModulesItemValueType2IteratorType1Type(d.pop("type")) + + flow_preview_value_modules_item_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + flow_preview_value_modules_item_value_type_2_iterator_type_1.additional_properties = d + return flow_preview_value_modules_item_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..a9344e9aae --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowPreviewValueModulesItemValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2_type.py new file mode 100644 index 0000000000..42eab936d5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowPreviewValueModulesItemValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_3.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_3.py new file mode 100644 index 0000000000..201440fbbe --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_3.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_preview_value_modules_item_value_type_3_type import FlowPreviewValueModulesItemValueType3Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowPreviewValueModulesItemValueType3") + + +@attr.s(auto_attribs=True) +class FlowPreviewValueModulesItemValueType3: + """ + Attributes: + type (FlowPreviewValueModulesItemValueType3Type): + path (Union[Unset, str]): + """ + + type: FlowPreviewValueModulesItemValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = FlowPreviewValueModulesItemValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + flow_preview_value_modules_item_value_type_3 = cls( + type=type, + path=path, + ) + + flow_preview_value_modules_item_value_type_3.additional_properties = d + return flow_preview_value_modules_item_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_3_type.py new file mode 100644 index 0000000000..af10b0bff3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_preview_value_modules_item_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowPreviewValueModulesItemValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_schema.py b/python-client/windmill-api/windmill_api/models/flow_schema.py new file mode 100644 index 0000000000..f4211799f6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_schema.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="FlowSchema") + + +@attr.s(auto_attribs=True) +class FlowSchema: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + flow_schema = cls() + + flow_schema.additional_properties = d + return flow_schema + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_status.py b/python-client/windmill-api/windmill_api/models/flow_status.py new file mode 100644 index 0000000000..abc5f8c04c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_status.py @@ -0,0 +1,102 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_status_failure_module import FlowStatusFailureModule +from ..models.flow_status_modules_item import FlowStatusModulesItem +from ..models.flow_status_retry import FlowStatusRetry +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowStatus") + + +@attr.s(auto_attribs=True) +class FlowStatus: + """ + Attributes: + step (int): + modules (List[FlowStatusModulesItem]): + failure_module (FlowStatusFailureModule): + retry (Union[Unset, FlowStatusRetry]): + """ + + step: int + modules: List[FlowStatusModulesItem] + failure_module: FlowStatusFailureModule + retry: Union[Unset, FlowStatusRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + step = self.step + modules = [] + for modules_item_data in self.modules: + modules_item = modules_item_data.to_dict() + + modules.append(modules_item) + + failure_module = self.failure_module.to_dict() + + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "step": step, + "modules": modules, + "failure_module": failure_module, + } + ) + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + step = d.pop("step") + + modules = [] + _modules = d.pop("modules") + for modules_item_data in _modules: + modules_item = FlowStatusModulesItem.from_dict(modules_item_data) + + modules.append(modules_item) + + failure_module = FlowStatusFailureModule.from_dict(d.pop("failure_module")) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, FlowStatusRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = FlowStatusRetry.from_dict(_retry) + + flow_status = cls( + step=step, + modules=modules, + failure_module=failure_module, + retry=retry, + ) + + flow_status.additional_properties = d + return flow_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_status_failure_module.py b/python-client/windmill-api/windmill_api/models/flow_status_failure_module.py new file mode 100644 index 0000000000..96e7a093e9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_status_failure_module.py @@ -0,0 +1,104 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.flow_status_failure_module_iterator import FlowStatusFailureModuleIterator +from ..models.flow_status_failure_module_type import FlowStatusFailureModuleType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowStatusFailureModule") + + +@attr.s(auto_attribs=True) +class FlowStatusFailureModule: + """ + Attributes: + type (FlowStatusFailureModuleType): + job (Union[Unset, str]): + count (Union[Unset, int]): + iterator (Union[Unset, FlowStatusFailureModuleIterator]): + forloop_jobs (Union[Unset, List[str]]): + """ + + type: FlowStatusFailureModuleType + job: Union[Unset, str] = UNSET + count: Union[Unset, int] = UNSET + iterator: Union[Unset, FlowStatusFailureModuleIterator] = UNSET + forloop_jobs: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + job = self.job + count = self.count + iterator: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.iterator, Unset): + iterator = self.iterator.to_dict() + + forloop_jobs: Union[Unset, List[str]] = UNSET + if not isinstance(self.forloop_jobs, Unset): + forloop_jobs = self.forloop_jobs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if job is not UNSET: + field_dict["job"] = job + if count is not UNSET: + field_dict["count"] = count + if iterator is not UNSET: + field_dict["iterator"] = iterator + if forloop_jobs is not UNSET: + field_dict["forloop_jobs"] = forloop_jobs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = FlowStatusFailureModuleType(d.pop("type")) + + job = d.pop("job", UNSET) + + count = d.pop("count", UNSET) + + _iterator = d.pop("iterator", UNSET) + iterator: Union[Unset, FlowStatusFailureModuleIterator] + if isinstance(_iterator, Unset): + iterator = UNSET + else: + iterator = FlowStatusFailureModuleIterator.from_dict(_iterator) + + forloop_jobs = cast(List[str], d.pop("forloop_jobs", UNSET)) + + flow_status_failure_module = cls( + type=type, + job=job, + count=count, + iterator=iterator, + forloop_jobs=forloop_jobs, + ) + + flow_status_failure_module.additional_properties = d + return flow_status_failure_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_status_failure_module_iterator.py b/python-client/windmill-api/windmill_api/models/flow_status_failure_module_iterator.py new file mode 100644 index 0000000000..886233713c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_status_failure_module_iterator.py @@ -0,0 +1,76 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowStatusFailureModuleIterator") + + +@attr.s(auto_attribs=True) +class FlowStatusFailureModuleIterator: + """ + Attributes: + index (Union[Unset, int]): + itered (Union[Unset, List[Any]]): + args (Union[Unset, Any]): + """ + + index: Union[Unset, int] = UNSET + itered: Union[Unset, List[Any]] = UNSET + args: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + index = self.index + itered: Union[Unset, List[Any]] = UNSET + if not isinstance(self.itered, Unset): + itered = self.itered + + args = self.args + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if index is not UNSET: + field_dict["index"] = index + if itered is not UNSET: + field_dict["itered"] = itered + if args is not UNSET: + field_dict["args"] = args + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + index = d.pop("index", UNSET) + + itered = cast(List[Any], d.pop("itered", UNSET)) + + args = d.pop("args", UNSET) + + flow_status_failure_module_iterator = cls( + index=index, + itered=itered, + args=args, + ) + + flow_status_failure_module_iterator.additional_properties = d + return flow_status_failure_module_iterator + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_status_failure_module_type.py b/python-client/windmill-api/windmill_api/models/flow_status_failure_module_type.py new file mode 100644 index 0000000000..ad5c1d4fd1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_status_failure_module_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class FlowStatusFailureModuleType(str, Enum): + WAITINGFORPRIORSTEPS = "WaitingForPriorSteps" + WAITINGFOREVENT = "WaitingForEvent" + WAITINGFOREXECUTOR = "WaitingForExecutor" + INPROGRESS = "InProgress" + SUCCESS = "Success" + FAILURE = "Failure" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_status_module.py b/python-client/windmill-api/windmill_api/models/flow_status_module.py new file mode 100644 index 0000000000..02227bd32b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_status_module.py @@ -0,0 +1,104 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.flow_status_module_iterator import FlowStatusModuleIterator +from ..models.flow_status_module_type import FlowStatusModuleType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowStatusModule") + + +@attr.s(auto_attribs=True) +class FlowStatusModule: + """ + Attributes: + type (FlowStatusModuleType): + job (Union[Unset, str]): + count (Union[Unset, int]): + iterator (Union[Unset, FlowStatusModuleIterator]): + forloop_jobs (Union[Unset, List[str]]): + """ + + type: FlowStatusModuleType + job: Union[Unset, str] = UNSET + count: Union[Unset, int] = UNSET + iterator: Union[Unset, FlowStatusModuleIterator] = UNSET + forloop_jobs: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + job = self.job + count = self.count + iterator: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.iterator, Unset): + iterator = self.iterator.to_dict() + + forloop_jobs: Union[Unset, List[str]] = UNSET + if not isinstance(self.forloop_jobs, Unset): + forloop_jobs = self.forloop_jobs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if job is not UNSET: + field_dict["job"] = job + if count is not UNSET: + field_dict["count"] = count + if iterator is not UNSET: + field_dict["iterator"] = iterator + if forloop_jobs is not UNSET: + field_dict["forloop_jobs"] = forloop_jobs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = FlowStatusModuleType(d.pop("type")) + + job = d.pop("job", UNSET) + + count = d.pop("count", UNSET) + + _iterator = d.pop("iterator", UNSET) + iterator: Union[Unset, FlowStatusModuleIterator] + if isinstance(_iterator, Unset): + iterator = UNSET + else: + iterator = FlowStatusModuleIterator.from_dict(_iterator) + + forloop_jobs = cast(List[str], d.pop("forloop_jobs", UNSET)) + + flow_status_module = cls( + type=type, + job=job, + count=count, + iterator=iterator, + forloop_jobs=forloop_jobs, + ) + + flow_status_module.additional_properties = d + return flow_status_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_status_module_iterator.py b/python-client/windmill-api/windmill_api/models/flow_status_module_iterator.py new file mode 100644 index 0000000000..8e4e480160 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_status_module_iterator.py @@ -0,0 +1,76 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowStatusModuleIterator") + + +@attr.s(auto_attribs=True) +class FlowStatusModuleIterator: + """ + Attributes: + index (Union[Unset, int]): + itered (Union[Unset, List[Any]]): + args (Union[Unset, Any]): + """ + + index: Union[Unset, int] = UNSET + itered: Union[Unset, List[Any]] = UNSET + args: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + index = self.index + itered: Union[Unset, List[Any]] = UNSET + if not isinstance(self.itered, Unset): + itered = self.itered + + args = self.args + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if index is not UNSET: + field_dict["index"] = index + if itered is not UNSET: + field_dict["itered"] = itered + if args is not UNSET: + field_dict["args"] = args + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + index = d.pop("index", UNSET) + + itered = cast(List[Any], d.pop("itered", UNSET)) + + args = d.pop("args", UNSET) + + flow_status_module_iterator = cls( + index=index, + itered=itered, + args=args, + ) + + flow_status_module_iterator.additional_properties = d + return flow_status_module_iterator + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_status_module_type.py b/python-client/windmill-api/windmill_api/models/flow_status_module_type.py new file mode 100644 index 0000000000..de3297df2e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_status_module_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class FlowStatusModuleType(str, Enum): + WAITINGFORPRIORSTEPS = "WaitingForPriorSteps" + WAITINGFOREVENT = "WaitingForEvent" + WAITINGFOREXECUTOR = "WaitingForExecutor" + INPROGRESS = "InProgress" + SUCCESS = "Success" + FAILURE = "Failure" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_status_modules_item.py b/python-client/windmill-api/windmill_api/models/flow_status_modules_item.py new file mode 100644 index 0000000000..1f90c4b5db --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_status_modules_item.py @@ -0,0 +1,104 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.flow_status_modules_item_iterator import FlowStatusModulesItemIterator +from ..models.flow_status_modules_item_type import FlowStatusModulesItemType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowStatusModulesItem") + + +@attr.s(auto_attribs=True) +class FlowStatusModulesItem: + """ + Attributes: + type (FlowStatusModulesItemType): + job (Union[Unset, str]): + count (Union[Unset, int]): + iterator (Union[Unset, FlowStatusModulesItemIterator]): + forloop_jobs (Union[Unset, List[str]]): + """ + + type: FlowStatusModulesItemType + job: Union[Unset, str] = UNSET + count: Union[Unset, int] = UNSET + iterator: Union[Unset, FlowStatusModulesItemIterator] = UNSET + forloop_jobs: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + job = self.job + count = self.count + iterator: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.iterator, Unset): + iterator = self.iterator.to_dict() + + forloop_jobs: Union[Unset, List[str]] = UNSET + if not isinstance(self.forloop_jobs, Unset): + forloop_jobs = self.forloop_jobs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if job is not UNSET: + field_dict["job"] = job + if count is not UNSET: + field_dict["count"] = count + if iterator is not UNSET: + field_dict["iterator"] = iterator + if forloop_jobs is not UNSET: + field_dict["forloop_jobs"] = forloop_jobs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = FlowStatusModulesItemType(d.pop("type")) + + job = d.pop("job", UNSET) + + count = d.pop("count", UNSET) + + _iterator = d.pop("iterator", UNSET) + iterator: Union[Unset, FlowStatusModulesItemIterator] + if isinstance(_iterator, Unset): + iterator = UNSET + else: + iterator = FlowStatusModulesItemIterator.from_dict(_iterator) + + forloop_jobs = cast(List[str], d.pop("forloop_jobs", UNSET)) + + flow_status_modules_item = cls( + type=type, + job=job, + count=count, + iterator=iterator, + forloop_jobs=forloop_jobs, + ) + + flow_status_modules_item.additional_properties = d + return flow_status_modules_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_status_modules_item_iterator.py b/python-client/windmill-api/windmill_api/models/flow_status_modules_item_iterator.py new file mode 100644 index 0000000000..5c362d4653 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_status_modules_item_iterator.py @@ -0,0 +1,76 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowStatusModulesItemIterator") + + +@attr.s(auto_attribs=True) +class FlowStatusModulesItemIterator: + """ + Attributes: + index (Union[Unset, int]): + itered (Union[Unset, List[Any]]): + args (Union[Unset, Any]): + """ + + index: Union[Unset, int] = UNSET + itered: Union[Unset, List[Any]] = UNSET + args: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + index = self.index + itered: Union[Unset, List[Any]] = UNSET + if not isinstance(self.itered, Unset): + itered = self.itered + + args = self.args + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if index is not UNSET: + field_dict["index"] = index + if itered is not UNSET: + field_dict["itered"] = itered + if args is not UNSET: + field_dict["args"] = args + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + index = d.pop("index", UNSET) + + itered = cast(List[Any], d.pop("itered", UNSET)) + + args = d.pop("args", UNSET) + + flow_status_modules_item_iterator = cls( + index=index, + itered=itered, + args=args, + ) + + flow_status_modules_item_iterator.additional_properties = d + return flow_status_modules_item_iterator + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_status_modules_item_type.py b/python-client/windmill-api/windmill_api/models/flow_status_modules_item_type.py new file mode 100644 index 0000000000..be30d670a0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_status_modules_item_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class FlowStatusModulesItemType(str, Enum): + WAITINGFORPRIORSTEPS = "WaitingForPriorSteps" + WAITINGFOREVENT = "WaitingForEvent" + WAITINGFOREXECUTOR = "WaitingForExecutor" + INPROGRESS = "InProgress" + SUCCESS = "Success" + FAILURE = "Failure" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_status_retry.py b/python-client/windmill-api/windmill_api/models/flow_status_retry.py new file mode 100644 index 0000000000..6422c52614 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_status_retry.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowStatusRetry") + + +@attr.s(auto_attribs=True) +class FlowStatusRetry: + """ + Attributes: + fail_count (Union[Unset, int]): + """ + + fail_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + fail_count = self.fail_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if fail_count is not UNSET: + field_dict["fail_count"] = fail_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + fail_count = d.pop("fail_count", UNSET) + + flow_status_retry = cls( + fail_count=fail_count, + ) + + flow_status_retry.additional_properties = d + return flow_status_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value.py b/python-client/windmill-api/windmill_api/models/flow_value.py new file mode 100644 index 0000000000..ddadae3f82 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value.py @@ -0,0 +1,95 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_value_failure_module import FlowValueFailureModule +from ..models.flow_value_modules_item import FlowValueModulesItem +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowValue") + + +@attr.s(auto_attribs=True) +class FlowValue: + """ + Attributes: + modules (List[FlowValueModulesItem]): + failure_module (Union[Unset, FlowValueFailureModule]): + same_worker (Union[Unset, bool]): + """ + + modules: List[FlowValueModulesItem] + failure_module: Union[Unset, FlowValueFailureModule] = UNSET + same_worker: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + modules = [] + for modules_item_data in self.modules: + modules_item = modules_item_data.to_dict() + + modules.append(modules_item) + + failure_module: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.failure_module, Unset): + failure_module = self.failure_module.to_dict() + + same_worker = self.same_worker + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "modules": modules, + } + ) + if failure_module is not UNSET: + field_dict["failure_module"] = failure_module + if same_worker is not UNSET: + field_dict["same_worker"] = same_worker + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + modules = [] + _modules = d.pop("modules") + for modules_item_data in _modules: + modules_item = FlowValueModulesItem.from_dict(modules_item_data) + + modules.append(modules_item) + + _failure_module = d.pop("failure_module", UNSET) + failure_module: Union[Unset, FlowValueFailureModule] + if isinstance(_failure_module, Unset): + failure_module = UNSET + else: + failure_module = FlowValueFailureModule.from_dict(_failure_module) + + same_worker = d.pop("same_worker", UNSET) + + flow_value = cls( + modules=modules, + failure_module=failure_module, + same_worker=same_worker, + ) + + flow_value.additional_properties = d + return flow_value + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module.py new file mode 100644 index 0000000000..0d8540186e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module.py @@ -0,0 +1,228 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_value_failure_module_input_transforms import FlowValueFailureModuleInputTransforms +from ..models.flow_value_failure_module_retry import FlowValueFailureModuleRetry +from ..models.flow_value_failure_module_sleep_type_0 import FlowValueFailureModuleSleepType0 +from ..models.flow_value_failure_module_sleep_type_1 import FlowValueFailureModuleSleepType1 +from ..models.flow_value_failure_module_stop_after_if import FlowValueFailureModuleStopAfterIf +from ..models.flow_value_failure_module_value_type_0 import FlowValueFailureModuleValueType0 +from ..models.flow_value_failure_module_value_type_1 import FlowValueFailureModuleValueType1 +from ..models.flow_value_failure_module_value_type_2 import FlowValueFailureModuleValueType2 +from ..models.flow_value_failure_module_value_type_3 import FlowValueFailureModuleValueType3 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowValueFailureModule") + + +@attr.s(auto_attribs=True) +class FlowValueFailureModule: + """ + Attributes: + input_transforms (FlowValueFailureModuleInputTransforms): + value (Union[FlowValueFailureModuleValueType0, FlowValueFailureModuleValueType1, + FlowValueFailureModuleValueType2, FlowValueFailureModuleValueType3]): + stop_after_if (Union[Unset, FlowValueFailureModuleStopAfterIf]): + sleep (Union[FlowValueFailureModuleSleepType0, FlowValueFailureModuleSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, FlowValueFailureModuleRetry]): + """ + + input_transforms: FlowValueFailureModuleInputTransforms + value: Union[ + FlowValueFailureModuleValueType0, + FlowValueFailureModuleValueType1, + FlowValueFailureModuleValueType2, + FlowValueFailureModuleValueType3, + ] + stop_after_if: Union[Unset, FlowValueFailureModuleStopAfterIf] = UNSET + sleep: Union[FlowValueFailureModuleSleepType0, FlowValueFailureModuleSleepType1, Unset] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, FlowValueFailureModuleRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, FlowValueFailureModuleValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, FlowValueFailureModuleValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, FlowValueFailureModuleValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, FlowValueFailureModuleSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = FlowValueFailureModuleInputTransforms.from_dict(d.pop("input_transforms")) + + def _parse_value( + data: object, + ) -> Union[ + FlowValueFailureModuleValueType0, + FlowValueFailureModuleValueType1, + FlowValueFailureModuleValueType2, + FlowValueFailureModuleValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = FlowValueFailureModuleValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = FlowValueFailureModuleValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = FlowValueFailureModuleValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = FlowValueFailureModuleValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, FlowValueFailureModuleStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = FlowValueFailureModuleStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[FlowValueFailureModuleSleepType0, FlowValueFailureModuleSleepType1, Unset]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, FlowValueFailureModuleSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = FlowValueFailureModuleSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, FlowValueFailureModuleSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = FlowValueFailureModuleSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, FlowValueFailureModuleRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = FlowValueFailureModuleRetry.from_dict(_retry) + + flow_value_failure_module = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + flow_value_failure_module.additional_properties = d + return flow_value_failure_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_input_transforms.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_input_transforms.py new file mode 100644 index 0000000000..d26731ddfd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_input_transforms.py @@ -0,0 +1,107 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_value_failure_module_input_transforms_additional_property_type_0 import ( + FlowValueFailureModuleInputTransformsAdditionalPropertyType0, +) +from ..models.flow_value_failure_module_input_transforms_additional_property_type_1 import ( + FlowValueFailureModuleInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="FlowValueFailureModuleInputTransforms") + + +@attr.s(auto_attribs=True) +class FlowValueFailureModuleInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + FlowValueFailureModuleInputTransformsAdditionalPropertyType0, + FlowValueFailureModuleInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, FlowValueFailureModuleInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + flow_value_failure_module_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + FlowValueFailureModuleInputTransformsAdditionalPropertyType0, + FlowValueFailureModuleInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = FlowValueFailureModuleInputTransformsAdditionalPropertyType0.from_dict( + data + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = FlowValueFailureModuleInputTransformsAdditionalPropertyType1.from_dict( + data + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + flow_value_failure_module_input_transforms.additional_properties = additional_properties + return flow_value_failure_module_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + FlowValueFailureModuleInputTransformsAdditionalPropertyType0, + FlowValueFailureModuleInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + FlowValueFailureModuleInputTransformsAdditionalPropertyType0, + FlowValueFailureModuleInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..af9b491a74 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_input_transforms_additional_property_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_value_failure_module_input_transforms_additional_property_type_0_type import ( + FlowValueFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowValueFailureModuleInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class FlowValueFailureModuleInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (FlowValueFailureModuleInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: FlowValueFailureModuleInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = FlowValueFailureModuleInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + flow_value_failure_module_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + flow_value_failure_module_input_transforms_additional_property_type_0.additional_properties = d + return flow_value_failure_module_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..b4d01b200e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowValueFailureModuleInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..15404d0e75 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_input_transforms_additional_property_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.flow_value_failure_module_input_transforms_additional_property_type_1_type import ( + FlowValueFailureModuleInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="FlowValueFailureModuleInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class FlowValueFailureModuleInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (FlowValueFailureModuleInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: FlowValueFailureModuleInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = FlowValueFailureModuleInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + flow_value_failure_module_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + flow_value_failure_module_input_transforms_additional_property_type_1.additional_properties = d + return flow_value_failure_module_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..7cdb632da0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowValueFailureModuleInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_retry.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_retry.py new file mode 100644 index 0000000000..d74d28f18c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_retry.py @@ -0,0 +1,82 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_value_failure_module_retry_constant import FlowValueFailureModuleRetryConstant +from ..models.flow_value_failure_module_retry_exponential import FlowValueFailureModuleRetryExponential +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowValueFailureModuleRetry") + + +@attr.s(auto_attribs=True) +class FlowValueFailureModuleRetry: + """ + Attributes: + constant (Union[Unset, FlowValueFailureModuleRetryConstant]): + exponential (Union[Unset, FlowValueFailureModuleRetryExponential]): + """ + + constant: Union[Unset, FlowValueFailureModuleRetryConstant] = UNSET + exponential: Union[Unset, FlowValueFailureModuleRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, FlowValueFailureModuleRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = FlowValueFailureModuleRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, FlowValueFailureModuleRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = FlowValueFailureModuleRetryExponential.from_dict(_exponential) + + flow_value_failure_module_retry = cls( + constant=constant, + exponential=exponential, + ) + + flow_value_failure_module_retry.additional_properties = d + return flow_value_failure_module_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_retry_constant.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_retry_constant.py new file mode 100644 index 0000000000..7be0265994 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowValueFailureModuleRetryConstant") + + +@attr.s(auto_attribs=True) +class FlowValueFailureModuleRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + flow_value_failure_module_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + flow_value_failure_module_retry_constant.additional_properties = d + return flow_value_failure_module_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_retry_exponential.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_retry_exponential.py new file mode 100644 index 0000000000..bbbf93b5f5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowValueFailureModuleRetryExponential") + + +@attr.s(auto_attribs=True) +class FlowValueFailureModuleRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + flow_value_failure_module_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + flow_value_failure_module_retry_exponential.additional_properties = d + return flow_value_failure_module_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_sleep_type_0.py new file mode 100644 index 0000000000..7f78d5497d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_sleep_type_0.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_value_failure_module_sleep_type_0_type import FlowValueFailureModuleSleepType0Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowValueFailureModuleSleepType0") + + +@attr.s(auto_attribs=True) +class FlowValueFailureModuleSleepType0: + """ + Attributes: + type (FlowValueFailureModuleSleepType0Type): + value (Union[Unset, Any]): + """ + + type: FlowValueFailureModuleSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = FlowValueFailureModuleSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + flow_value_failure_module_sleep_type_0 = cls( + type=type, + value=value, + ) + + flow_value_failure_module_sleep_type_0.additional_properties = d + return flow_value_failure_module_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_sleep_type_0_type.py new file mode 100644 index 0000000000..96e12c00b8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowValueFailureModuleSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_sleep_type_1.py new file mode 100644 index 0000000000..6fd2c86697 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_sleep_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.flow_value_failure_module_sleep_type_1_type import FlowValueFailureModuleSleepType1Type + +T = TypeVar("T", bound="FlowValueFailureModuleSleepType1") + + +@attr.s(auto_attribs=True) +class FlowValueFailureModuleSleepType1: + """ + Attributes: + expr (str): + type (FlowValueFailureModuleSleepType1Type): + """ + + expr: str + type: FlowValueFailureModuleSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = FlowValueFailureModuleSleepType1Type(d.pop("type")) + + flow_value_failure_module_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + flow_value_failure_module_sleep_type_1.additional_properties = d + return flow_value_failure_module_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_sleep_type_1_type.py new file mode 100644 index 0000000000..3904ee0e06 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowValueFailureModuleSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_stop_after_if.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_stop_after_if.py new file mode 100644 index 0000000000..04bda709d6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowValueFailureModuleStopAfterIf") + + +@attr.s(auto_attribs=True) +class FlowValueFailureModuleStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + flow_value_failure_module_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + flow_value_failure_module_stop_after_if.additional_properties = d + return flow_value_failure_module_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_0.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_0.py new file mode 100644 index 0000000000..f25fc85ba1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_0.py @@ -0,0 +1,83 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_value_failure_module_value_type_0_language import FlowValueFailureModuleValueType0Language +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowValueFailureModuleValueType0") + + +@attr.s(auto_attribs=True) +class FlowValueFailureModuleValueType0: + """ + Attributes: + content (str): + language (FlowValueFailureModuleValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: FlowValueFailureModuleValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = FlowValueFailureModuleValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + flow_value_failure_module_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + flow_value_failure_module_value_type_0.additional_properties = d + return flow_value_failure_module_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_0_language.py new file mode 100644 index 0000000000..032ee31f79 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class FlowValueFailureModuleValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_1.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_1.py new file mode 100644 index 0000000000..d3679b0db0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.flow_value_failure_module_value_type_1_type import FlowValueFailureModuleValueType1Type + +T = TypeVar("T", bound="FlowValueFailureModuleValueType1") + + +@attr.s(auto_attribs=True) +class FlowValueFailureModuleValueType1: + """ + Attributes: + path (str): + type (FlowValueFailureModuleValueType1Type): + """ + + path: str + type: FlowValueFailureModuleValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = FlowValueFailureModuleValueType1Type(d.pop("type")) + + flow_value_failure_module_value_type_1 = cls( + path=path, + type=type, + ) + + flow_value_failure_module_value_type_1.additional_properties = d + return flow_value_failure_module_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_1_type.py new file mode 100644 index 0000000000..9fd93d0bc0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowValueFailureModuleValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2.py new file mode 100644 index 0000000000..52fc592f3e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2.py @@ -0,0 +1,103 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_value_failure_module_value_type_2_iterator_type_0 import ( + FlowValueFailureModuleValueType2IteratorType0, +) +from ..models.flow_value_failure_module_value_type_2_iterator_type_1 import ( + FlowValueFailureModuleValueType2IteratorType1, +) +from ..models.flow_value_failure_module_value_type_2_type import FlowValueFailureModuleValueType2Type + +T = TypeVar("T", bound="FlowValueFailureModuleValueType2") + + +@attr.s(auto_attribs=True) +class FlowValueFailureModuleValueType2: + """ + Attributes: + iterator (Union[FlowValueFailureModuleValueType2IteratorType0, FlowValueFailureModuleValueType2IteratorType1]): + skip_failures (bool): + type (FlowValueFailureModuleValueType2Type): + """ + + iterator: Union[FlowValueFailureModuleValueType2IteratorType0, FlowValueFailureModuleValueType2IteratorType1] + skip_failures: bool + type: FlowValueFailureModuleValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, FlowValueFailureModuleValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[FlowValueFailureModuleValueType2IteratorType0, FlowValueFailureModuleValueType2IteratorType1]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = FlowValueFailureModuleValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = FlowValueFailureModuleValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = FlowValueFailureModuleValueType2Type(d.pop("type")) + + flow_value_failure_module_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + flow_value_failure_module_value_type_2.additional_properties = d + return flow_value_failure_module_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..f90252533b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_value_failure_module_value_type_2_iterator_type_0_type import ( + FlowValueFailureModuleValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowValueFailureModuleValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class FlowValueFailureModuleValueType2IteratorType0: + """ + Attributes: + type (FlowValueFailureModuleValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: FlowValueFailureModuleValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = FlowValueFailureModuleValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + flow_value_failure_module_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + flow_value_failure_module_value_type_2_iterator_type_0.additional_properties = d + return flow_value_failure_module_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..26f0f50192 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowValueFailureModuleValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..980482e992 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.flow_value_failure_module_value_type_2_iterator_type_1_type import ( + FlowValueFailureModuleValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="FlowValueFailureModuleValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class FlowValueFailureModuleValueType2IteratorType1: + """ + Attributes: + expr (str): + type (FlowValueFailureModuleValueType2IteratorType1Type): + """ + + expr: str + type: FlowValueFailureModuleValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = FlowValueFailureModuleValueType2IteratorType1Type(d.pop("type")) + + flow_value_failure_module_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + flow_value_failure_module_value_type_2_iterator_type_1.additional_properties = d + return flow_value_failure_module_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..c00123fa23 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowValueFailureModuleValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2_type.py new file mode 100644 index 0000000000..26e9eaaf37 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowValueFailureModuleValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_3.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_3.py new file mode 100644 index 0000000000..02607d4db5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_3.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_value_failure_module_value_type_3_type import FlowValueFailureModuleValueType3Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowValueFailureModuleValueType3") + + +@attr.s(auto_attribs=True) +class FlowValueFailureModuleValueType3: + """ + Attributes: + type (FlowValueFailureModuleValueType3Type): + path (Union[Unset, str]): + """ + + type: FlowValueFailureModuleValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = FlowValueFailureModuleValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + flow_value_failure_module_value_type_3 = cls( + type=type, + path=path, + ) + + flow_value_failure_module_value_type_3.additional_properties = d + return flow_value_failure_module_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_3_type.py new file mode 100644 index 0000000000..0c6fa265c9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_failure_module_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowValueFailureModuleValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item.py new file mode 100644 index 0000000000..47f400db0e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item.py @@ -0,0 +1,226 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_value_modules_item_input_transforms import FlowValueModulesItemInputTransforms +from ..models.flow_value_modules_item_retry import FlowValueModulesItemRetry +from ..models.flow_value_modules_item_sleep_type_0 import FlowValueModulesItemSleepType0 +from ..models.flow_value_modules_item_sleep_type_1 import FlowValueModulesItemSleepType1 +from ..models.flow_value_modules_item_stop_after_if import FlowValueModulesItemStopAfterIf +from ..models.flow_value_modules_item_value_type_0 import FlowValueModulesItemValueType0 +from ..models.flow_value_modules_item_value_type_1 import FlowValueModulesItemValueType1 +from ..models.flow_value_modules_item_value_type_2 import FlowValueModulesItemValueType2 +from ..models.flow_value_modules_item_value_type_3 import FlowValueModulesItemValueType3 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowValueModulesItem") + + +@attr.s(auto_attribs=True) +class FlowValueModulesItem: + """ + Attributes: + input_transforms (FlowValueModulesItemInputTransforms): + value (Union[FlowValueModulesItemValueType0, FlowValueModulesItemValueType1, FlowValueModulesItemValueType2, + FlowValueModulesItemValueType3]): + stop_after_if (Union[Unset, FlowValueModulesItemStopAfterIf]): + sleep (Union[FlowValueModulesItemSleepType0, FlowValueModulesItemSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, FlowValueModulesItemRetry]): + """ + + input_transforms: FlowValueModulesItemInputTransforms + value: Union[ + FlowValueModulesItemValueType0, + FlowValueModulesItemValueType1, + FlowValueModulesItemValueType2, + FlowValueModulesItemValueType3, + ] + stop_after_if: Union[Unset, FlowValueModulesItemStopAfterIf] = UNSET + sleep: Union[FlowValueModulesItemSleepType0, FlowValueModulesItemSleepType1, Unset] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, FlowValueModulesItemRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, FlowValueModulesItemValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, FlowValueModulesItemValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, FlowValueModulesItemValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, FlowValueModulesItemSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = FlowValueModulesItemInputTransforms.from_dict(d.pop("input_transforms")) + + def _parse_value( + data: object, + ) -> Union[ + FlowValueModulesItemValueType0, + FlowValueModulesItemValueType1, + FlowValueModulesItemValueType2, + FlowValueModulesItemValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = FlowValueModulesItemValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = FlowValueModulesItemValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = FlowValueModulesItemValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = FlowValueModulesItemValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, FlowValueModulesItemStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = FlowValueModulesItemStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep(data: object) -> Union[FlowValueModulesItemSleepType0, FlowValueModulesItemSleepType1, Unset]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, FlowValueModulesItemSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = FlowValueModulesItemSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, FlowValueModulesItemSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = FlowValueModulesItemSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, FlowValueModulesItemRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = FlowValueModulesItemRetry.from_dict(_retry) + + flow_value_modules_item = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + flow_value_modules_item.additional_properties = d + return flow_value_modules_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_input_transforms.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_input_transforms.py new file mode 100644 index 0000000000..dde535b156 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_input_transforms.py @@ -0,0 +1,105 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_value_modules_item_input_transforms_additional_property_type_0 import ( + FlowValueModulesItemInputTransformsAdditionalPropertyType0, +) +from ..models.flow_value_modules_item_input_transforms_additional_property_type_1 import ( + FlowValueModulesItemInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="FlowValueModulesItemInputTransforms") + + +@attr.s(auto_attribs=True) +class FlowValueModulesItemInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + FlowValueModulesItemInputTransformsAdditionalPropertyType0, + FlowValueModulesItemInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, FlowValueModulesItemInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + flow_value_modules_item_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + FlowValueModulesItemInputTransformsAdditionalPropertyType0, + FlowValueModulesItemInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = FlowValueModulesItemInputTransformsAdditionalPropertyType0.from_dict( + data + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = FlowValueModulesItemInputTransformsAdditionalPropertyType1.from_dict(data) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + flow_value_modules_item_input_transforms.additional_properties = additional_properties + return flow_value_modules_item_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + FlowValueModulesItemInputTransformsAdditionalPropertyType0, + FlowValueModulesItemInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + FlowValueModulesItemInputTransformsAdditionalPropertyType0, + FlowValueModulesItemInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..01ec4210b9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_input_transforms_additional_property_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_value_modules_item_input_transforms_additional_property_type_0_type import ( + FlowValueModulesItemInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowValueModulesItemInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class FlowValueModulesItemInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (FlowValueModulesItemInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: FlowValueModulesItemInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = FlowValueModulesItemInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + flow_value_modules_item_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + flow_value_modules_item_input_transforms_additional_property_type_0.additional_properties = d + return flow_value_modules_item_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..b2b452b239 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowValueModulesItemInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..c41d7865c4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_input_transforms_additional_property_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.flow_value_modules_item_input_transforms_additional_property_type_1_type import ( + FlowValueModulesItemInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="FlowValueModulesItemInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class FlowValueModulesItemInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (FlowValueModulesItemInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: FlowValueModulesItemInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = FlowValueModulesItemInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + flow_value_modules_item_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + flow_value_modules_item_input_transforms_additional_property_type_1.additional_properties = d + return flow_value_modules_item_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..3e14293881 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowValueModulesItemInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_retry.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_retry.py new file mode 100644 index 0000000000..43873b181a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_retry.py @@ -0,0 +1,82 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_value_modules_item_retry_constant import FlowValueModulesItemRetryConstant +from ..models.flow_value_modules_item_retry_exponential import FlowValueModulesItemRetryExponential +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowValueModulesItemRetry") + + +@attr.s(auto_attribs=True) +class FlowValueModulesItemRetry: + """ + Attributes: + constant (Union[Unset, FlowValueModulesItemRetryConstant]): + exponential (Union[Unset, FlowValueModulesItemRetryExponential]): + """ + + constant: Union[Unset, FlowValueModulesItemRetryConstant] = UNSET + exponential: Union[Unset, FlowValueModulesItemRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, FlowValueModulesItemRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = FlowValueModulesItemRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, FlowValueModulesItemRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = FlowValueModulesItemRetryExponential.from_dict(_exponential) + + flow_value_modules_item_retry = cls( + constant=constant, + exponential=exponential, + ) + + flow_value_modules_item_retry.additional_properties = d + return flow_value_modules_item_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_retry_constant.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_retry_constant.py new file mode 100644 index 0000000000..fb4cabf9cd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowValueModulesItemRetryConstant") + + +@attr.s(auto_attribs=True) +class FlowValueModulesItemRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + flow_value_modules_item_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + flow_value_modules_item_retry_constant.additional_properties = d + return flow_value_modules_item_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_retry_exponential.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_retry_exponential.py new file mode 100644 index 0000000000..ca44c54c54 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowValueModulesItemRetryExponential") + + +@attr.s(auto_attribs=True) +class FlowValueModulesItemRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + flow_value_modules_item_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + flow_value_modules_item_retry_exponential.additional_properties = d + return flow_value_modules_item_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_sleep_type_0.py new file mode 100644 index 0000000000..82f39f74b2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_sleep_type_0.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_value_modules_item_sleep_type_0_type import FlowValueModulesItemSleepType0Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowValueModulesItemSleepType0") + + +@attr.s(auto_attribs=True) +class FlowValueModulesItemSleepType0: + """ + Attributes: + type (FlowValueModulesItemSleepType0Type): + value (Union[Unset, Any]): + """ + + type: FlowValueModulesItemSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = FlowValueModulesItemSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + flow_value_modules_item_sleep_type_0 = cls( + type=type, + value=value, + ) + + flow_value_modules_item_sleep_type_0.additional_properties = d + return flow_value_modules_item_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_sleep_type_0_type.py new file mode 100644 index 0000000000..da56b4bc72 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowValueModulesItemSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_sleep_type_1.py new file mode 100644 index 0000000000..17ca0eec19 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_sleep_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.flow_value_modules_item_sleep_type_1_type import FlowValueModulesItemSleepType1Type + +T = TypeVar("T", bound="FlowValueModulesItemSleepType1") + + +@attr.s(auto_attribs=True) +class FlowValueModulesItemSleepType1: + """ + Attributes: + expr (str): + type (FlowValueModulesItemSleepType1Type): + """ + + expr: str + type: FlowValueModulesItemSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = FlowValueModulesItemSleepType1Type(d.pop("type")) + + flow_value_modules_item_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + flow_value_modules_item_sleep_type_1.additional_properties = d + return flow_value_modules_item_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_sleep_type_1_type.py new file mode 100644 index 0000000000..436343e111 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowValueModulesItemSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_stop_after_if.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_stop_after_if.py new file mode 100644 index 0000000000..6a146ef2f6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowValueModulesItemStopAfterIf") + + +@attr.s(auto_attribs=True) +class FlowValueModulesItemStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + flow_value_modules_item_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + flow_value_modules_item_stop_after_if.additional_properties = d + return flow_value_modules_item_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_0.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_0.py new file mode 100644 index 0000000000..14df841c54 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_0.py @@ -0,0 +1,83 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_value_modules_item_value_type_0_language import FlowValueModulesItemValueType0Language +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowValueModulesItemValueType0") + + +@attr.s(auto_attribs=True) +class FlowValueModulesItemValueType0: + """ + Attributes: + content (str): + language (FlowValueModulesItemValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: FlowValueModulesItemValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = FlowValueModulesItemValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + flow_value_modules_item_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + flow_value_modules_item_value_type_0.additional_properties = d + return flow_value_modules_item_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_0_language.py new file mode 100644 index 0000000000..832691f6ae --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class FlowValueModulesItemValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_1.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_1.py new file mode 100644 index 0000000000..3c80c1aa7c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.flow_value_modules_item_value_type_1_type import FlowValueModulesItemValueType1Type + +T = TypeVar("T", bound="FlowValueModulesItemValueType1") + + +@attr.s(auto_attribs=True) +class FlowValueModulesItemValueType1: + """ + Attributes: + path (str): + type (FlowValueModulesItemValueType1Type): + """ + + path: str + type: FlowValueModulesItemValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = FlowValueModulesItemValueType1Type(d.pop("type")) + + flow_value_modules_item_value_type_1 = cls( + path=path, + type=type, + ) + + flow_value_modules_item_value_type_1.additional_properties = d + return flow_value_modules_item_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_1_type.py new file mode 100644 index 0000000000..66146c9e2f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowValueModulesItemValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2.py new file mode 100644 index 0000000000..23eb2f199f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2.py @@ -0,0 +1,99 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_value_modules_item_value_type_2_iterator_type_0 import FlowValueModulesItemValueType2IteratorType0 +from ..models.flow_value_modules_item_value_type_2_iterator_type_1 import FlowValueModulesItemValueType2IteratorType1 +from ..models.flow_value_modules_item_value_type_2_type import FlowValueModulesItemValueType2Type + +T = TypeVar("T", bound="FlowValueModulesItemValueType2") + + +@attr.s(auto_attribs=True) +class FlowValueModulesItemValueType2: + """ + Attributes: + iterator (Union[FlowValueModulesItemValueType2IteratorType0, FlowValueModulesItemValueType2IteratorType1]): + skip_failures (bool): + type (FlowValueModulesItemValueType2Type): + """ + + iterator: Union[FlowValueModulesItemValueType2IteratorType0, FlowValueModulesItemValueType2IteratorType1] + skip_failures: bool + type: FlowValueModulesItemValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, FlowValueModulesItemValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[FlowValueModulesItemValueType2IteratorType0, FlowValueModulesItemValueType2IteratorType1]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = FlowValueModulesItemValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = FlowValueModulesItemValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = FlowValueModulesItemValueType2Type(d.pop("type")) + + flow_value_modules_item_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + flow_value_modules_item_value_type_2.additional_properties = d + return flow_value_modules_item_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..5bfd281c97 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_value_modules_item_value_type_2_iterator_type_0_type import ( + FlowValueModulesItemValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowValueModulesItemValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class FlowValueModulesItemValueType2IteratorType0: + """ + Attributes: + type (FlowValueModulesItemValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: FlowValueModulesItemValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = FlowValueModulesItemValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + flow_value_modules_item_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + flow_value_modules_item_value_type_2_iterator_type_0.additional_properties = d + return flow_value_modules_item_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..711c917b23 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowValueModulesItemValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..4954c06363 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.flow_value_modules_item_value_type_2_iterator_type_1_type import ( + FlowValueModulesItemValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="FlowValueModulesItemValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class FlowValueModulesItemValueType2IteratorType1: + """ + Attributes: + expr (str): + type (FlowValueModulesItemValueType2IteratorType1Type): + """ + + expr: str + type: FlowValueModulesItemValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = FlowValueModulesItemValueType2IteratorType1Type(d.pop("type")) + + flow_value_modules_item_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + flow_value_modules_item_value_type_2_iterator_type_1.additional_properties = d + return flow_value_modules_item_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..9f93fcfaac --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowValueModulesItemValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2_type.py new file mode 100644 index 0000000000..553f28eda6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowValueModulesItemValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_3.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_3.py new file mode 100644 index 0000000000..fb6843a739 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_3.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flow_value_modules_item_value_type_3_type import FlowValueModulesItemValueType3Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FlowValueModulesItemValueType3") + + +@attr.s(auto_attribs=True) +class FlowValueModulesItemValueType3: + """ + Attributes: + type (FlowValueModulesItemValueType3Type): + path (Union[Unset, str]): + """ + + type: FlowValueModulesItemValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = FlowValueModulesItemValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + flow_value_modules_item_value_type_3 = cls( + type=type, + path=path, + ) + + flow_value_modules_item_value_type_3.additional_properties = d + return flow_value_modules_item_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_3_type.py new file mode 100644 index 0000000000..cc0edcee47 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/flow_value_modules_item_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FlowValueModulesItemValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/forloop_flow.py b/python-client/windmill-api/windmill_api/models/forloop_flow.py new file mode 100644 index 0000000000..ce4ccca455 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/forloop_flow.py @@ -0,0 +1,97 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.forloop_flow_iterator_type_0 import ForloopFlowIteratorType0 +from ..models.forloop_flow_iterator_type_1 import ForloopFlowIteratorType1 +from ..models.forloop_flow_type import ForloopFlowType + +T = TypeVar("T", bound="ForloopFlow") + + +@attr.s(auto_attribs=True) +class ForloopFlow: + """ + Attributes: + iterator (Union[ForloopFlowIteratorType0, ForloopFlowIteratorType1]): + skip_failures (bool): + type (ForloopFlowType): + """ + + iterator: Union[ForloopFlowIteratorType0, ForloopFlowIteratorType1] + skip_failures: bool + type: ForloopFlowType + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, ForloopFlowIteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator(data: object) -> Union[ForloopFlowIteratorType0, ForloopFlowIteratorType1]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = ForloopFlowIteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = ForloopFlowIteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = ForloopFlowType(d.pop("type")) + + forloop_flow = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + forloop_flow.additional_properties = d + return forloop_flow + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/forloop_flow_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/forloop_flow_iterator_type_0.py new file mode 100644 index 0000000000..3ba008aae9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/forloop_flow_iterator_type_0.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.forloop_flow_iterator_type_0_type import ForloopFlowIteratorType0Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ForloopFlowIteratorType0") + + +@attr.s(auto_attribs=True) +class ForloopFlowIteratorType0: + """ + Attributes: + type (ForloopFlowIteratorType0Type): + value (Union[Unset, Any]): + """ + + type: ForloopFlowIteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ForloopFlowIteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + forloop_flow_iterator_type_0 = cls( + type=type, + value=value, + ) + + forloop_flow_iterator_type_0.additional_properties = d + return forloop_flow_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/forloop_flow_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/forloop_flow_iterator_type_0_type.py new file mode 100644 index 0000000000..f69323633d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/forloop_flow_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ForloopFlowIteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/forloop_flow_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/forloop_flow_iterator_type_1.py new file mode 100644 index 0000000000..c309a687d6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/forloop_flow_iterator_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.forloop_flow_iterator_type_1_type import ForloopFlowIteratorType1Type + +T = TypeVar("T", bound="ForloopFlowIteratorType1") + + +@attr.s(auto_attribs=True) +class ForloopFlowIteratorType1: + """ + Attributes: + expr (str): + type (ForloopFlowIteratorType1Type): + """ + + expr: str + type: ForloopFlowIteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = ForloopFlowIteratorType1Type(d.pop("type")) + + forloop_flow_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + forloop_flow_iterator_type_1.additional_properties = d + return forloop_flow_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/forloop_flow_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/forloop_flow_iterator_type_1_type.py new file mode 100644 index 0000000000..ddd01ba598 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/forloop_flow_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ForloopFlowIteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/forloop_flow_type.py b/python-client/windmill-api/windmill_api/models/forloop_flow_type.py new file mode 100644 index 0000000000..e9aa56fdf0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/forloop_flow_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ForloopFlowType(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_audit_log_response_200.py b/python-client/windmill-api/windmill_api/models/get_audit_log_response_200.py new file mode 100644 index 0000000000..4cf33a51ac --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_audit_log_response_200.py @@ -0,0 +1,118 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.get_audit_log_response_200_action_kind import GetAuditLogResponse200ActionKind +from ..models.get_audit_log_response_200_operation import GetAuditLogResponse200Operation +from ..models.get_audit_log_response_200_parameters import GetAuditLogResponse200Parameters +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetAuditLogResponse200") + + +@attr.s(auto_attribs=True) +class GetAuditLogResponse200: + """ + Attributes: + id (int): + timestamp (datetime.datetime): + username (str): + operation (GetAuditLogResponse200Operation): + action_kind (GetAuditLogResponse200ActionKind): + resource (Union[Unset, str]): + parameters (Union[Unset, GetAuditLogResponse200Parameters]): + """ + + id: int + timestamp: datetime.datetime + username: str + operation: GetAuditLogResponse200Operation + action_kind: GetAuditLogResponse200ActionKind + resource: Union[Unset, str] = UNSET + parameters: Union[Unset, GetAuditLogResponse200Parameters] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + timestamp = self.timestamp.isoformat() + + username = self.username + operation = self.operation.value + + action_kind = self.action_kind.value + + resource = self.resource + parameters: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.parameters, Unset): + parameters = self.parameters.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "timestamp": timestamp, + "username": username, + "operation": operation, + "action_kind": action_kind, + } + ) + if resource is not UNSET: + field_dict["resource"] = resource + if parameters is not UNSET: + field_dict["parameters"] = parameters + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id") + + timestamp = isoparse(d.pop("timestamp")) + + username = d.pop("username") + + operation = GetAuditLogResponse200Operation(d.pop("operation")) + + action_kind = GetAuditLogResponse200ActionKind(d.pop("action_kind")) + + resource = d.pop("resource", UNSET) + + _parameters = d.pop("parameters", UNSET) + parameters: Union[Unset, GetAuditLogResponse200Parameters] + if isinstance(_parameters, Unset): + parameters = UNSET + else: + parameters = GetAuditLogResponse200Parameters.from_dict(_parameters) + + get_audit_log_response_200 = cls( + id=id, + timestamp=timestamp, + username=username, + operation=operation, + action_kind=action_kind, + resource=resource, + parameters=parameters, + ) + + get_audit_log_response_200.additional_properties = d + return get_audit_log_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_audit_log_response_200_action_kind.py b/python-client/windmill-api/windmill_api/models/get_audit_log_response_200_action_kind.py new file mode 100644 index 0000000000..fbe96ae83b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_audit_log_response_200_action_kind.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class GetAuditLogResponse200ActionKind(str, Enum): + CREATED = "Created" + UPDATED = "Updated" + DELETE = "Delete" + EXECUTE = "Execute" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_audit_log_response_200_operation.py b/python-client/windmill-api/windmill_api/models/get_audit_log_response_200_operation.py new file mode 100644 index 0000000000..66958dd046 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_audit_log_response_200_operation.py @@ -0,0 +1,20 @@ +from enum import Enum + + +class GetAuditLogResponse200Operation(str, Enum): + JOBS_RUN = "jobs.run" + SCRIPTS_CREATE = "scripts.create" + SCRIPTS_UPDATE = "scripts.update" + USERS_CREATE = "users.create" + USERS_DELETE = "users.delete" + USERS_SETPASSWORD = "users.setpassword" + USERS_UPDATE = "users.update" + USERS_LOGIN = "users.login" + USERS_TOKEN_CREATE = "users.token.create" + USERS_TOKEN_DELETE = "users.token.delete" + VARIABLES_CREATE = "variables.create" + VARIABLES_DELETE = "variables.delete" + VARIABLES_UPDATE = "variables.update" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_audit_log_response_200_parameters.py b/python-client/windmill-api/windmill_api/models/get_audit_log_response_200_parameters.py new file mode 100644 index 0000000000..44c7019220 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_audit_log_response_200_parameters.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="GetAuditLogResponse200Parameters") + + +@attr.s(auto_attribs=True) +class GetAuditLogResponse200Parameters: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + get_audit_log_response_200_parameters = cls() + + get_audit_log_response_200_parameters.additional_properties = d + return get_audit_log_response_200_parameters + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200.py new file mode 100644 index 0000000000..62300142e3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200.py @@ -0,0 +1,300 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.get_completed_job_response_200_args import GetCompletedJobResponse200Args +from ..models.get_completed_job_response_200_flow_status import GetCompletedJobResponse200FlowStatus +from ..models.get_completed_job_response_200_job_kind import GetCompletedJobResponse200JobKind +from ..models.get_completed_job_response_200_language import GetCompletedJobResponse200Language +from ..models.get_completed_job_response_200_raw_flow import GetCompletedJobResponse200RawFlow +from ..models.get_completed_job_response_200_result import GetCompletedJobResponse200Result +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200: + """ + Attributes: + id (str): + created_by (str): + created_at (datetime.datetime): + started_at (datetime.datetime): + duration_ms (int): + success (bool): + canceled (bool): + job_kind (GetCompletedJobResponse200JobKind): + permissioned_as (str): The user (u/userfoo) or group (g/groupfoo) whom + the execution of this script will be permissioned_as and by extension its DT_TOKEN. + is_flow_step (bool): + is_skipped (bool): + workspace_id (Union[Unset, str]): + parent_job (Union[Unset, str]): + script_path (Union[Unset, str]): + script_hash (Union[Unset, str]): + args (Union[Unset, GetCompletedJobResponse200Args]): + result (Union[Unset, GetCompletedJobResponse200Result]): + logs (Union[Unset, str]): + deleted (Union[Unset, bool]): + raw_code (Union[Unset, str]): + canceled_by (Union[Unset, str]): + canceled_reason (Union[Unset, str]): + schedule_path (Union[Unset, str]): + flow_status (Union[Unset, GetCompletedJobResponse200FlowStatus]): + raw_flow (Union[Unset, GetCompletedJobResponse200RawFlow]): + language (Union[Unset, GetCompletedJobResponse200Language]): + """ + + id: str + created_by: str + created_at: datetime.datetime + started_at: datetime.datetime + duration_ms: int + success: bool + canceled: bool + job_kind: GetCompletedJobResponse200JobKind + permissioned_as: str + is_flow_step: bool + is_skipped: bool + workspace_id: Union[Unset, str] = UNSET + parent_job: Union[Unset, str] = UNSET + script_path: Union[Unset, str] = UNSET + script_hash: Union[Unset, str] = UNSET + args: Union[Unset, GetCompletedJobResponse200Args] = UNSET + result: Union[Unset, GetCompletedJobResponse200Result] = UNSET + logs: Union[Unset, str] = UNSET + deleted: Union[Unset, bool] = UNSET + raw_code: Union[Unset, str] = UNSET + canceled_by: Union[Unset, str] = UNSET + canceled_reason: Union[Unset, str] = UNSET + schedule_path: Union[Unset, str] = UNSET + flow_status: Union[Unset, GetCompletedJobResponse200FlowStatus] = UNSET + raw_flow: Union[Unset, GetCompletedJobResponse200RawFlow] = UNSET + language: Union[Unset, GetCompletedJobResponse200Language] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + created_by = self.created_by + created_at = self.created_at.isoformat() + + started_at = self.started_at.isoformat() + + duration_ms = self.duration_ms + success = self.success + canceled = self.canceled + job_kind = self.job_kind.value + + permissioned_as = self.permissioned_as + is_flow_step = self.is_flow_step + is_skipped = self.is_skipped + workspace_id = self.workspace_id + parent_job = self.parent_job + script_path = self.script_path + script_hash = self.script_hash + args: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.args, Unset): + args = self.args.to_dict() + + result: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.result, Unset): + result = self.result.to_dict() + + logs = self.logs + deleted = self.deleted + raw_code = self.raw_code + canceled_by = self.canceled_by + canceled_reason = self.canceled_reason + schedule_path = self.schedule_path + flow_status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.flow_status, Unset): + flow_status = self.flow_status.to_dict() + + raw_flow: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.raw_flow, Unset): + raw_flow = self.raw_flow.to_dict() + + language: Union[Unset, str] = UNSET + if not isinstance(self.language, Unset): + language = self.language.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "created_by": created_by, + "created_at": created_at, + "started_at": started_at, + "duration_ms": duration_ms, + "success": success, + "canceled": canceled, + "job_kind": job_kind, + "permissioned_as": permissioned_as, + "is_flow_step": is_flow_step, + "is_skipped": is_skipped, + } + ) + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if parent_job is not UNSET: + field_dict["parent_job"] = parent_job + if script_path is not UNSET: + field_dict["script_path"] = script_path + if script_hash is not UNSET: + field_dict["script_hash"] = script_hash + if args is not UNSET: + field_dict["args"] = args + if result is not UNSET: + field_dict["result"] = result + if logs is not UNSET: + field_dict["logs"] = logs + if deleted is not UNSET: + field_dict["deleted"] = deleted + if raw_code is not UNSET: + field_dict["raw_code"] = raw_code + if canceled_by is not UNSET: + field_dict["canceled_by"] = canceled_by + if canceled_reason is not UNSET: + field_dict["canceled_reason"] = canceled_reason + if schedule_path is not UNSET: + field_dict["schedule_path"] = schedule_path + if flow_status is not UNSET: + field_dict["flow_status"] = flow_status + if raw_flow is not UNSET: + field_dict["raw_flow"] = raw_flow + if language is not UNSET: + field_dict["language"] = language + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id") + + created_by = d.pop("created_by") + + created_at = isoparse(d.pop("created_at")) + + started_at = isoparse(d.pop("started_at")) + + duration_ms = d.pop("duration_ms") + + success = d.pop("success") + + canceled = d.pop("canceled") + + job_kind = GetCompletedJobResponse200JobKind(d.pop("job_kind")) + + permissioned_as = d.pop("permissioned_as") + + is_flow_step = d.pop("is_flow_step") + + is_skipped = d.pop("is_skipped") + + workspace_id = d.pop("workspace_id", UNSET) + + parent_job = d.pop("parent_job", UNSET) + + script_path = d.pop("script_path", UNSET) + + script_hash = d.pop("script_hash", UNSET) + + _args = d.pop("args", UNSET) + args: Union[Unset, GetCompletedJobResponse200Args] + if isinstance(_args, Unset): + args = UNSET + else: + args = GetCompletedJobResponse200Args.from_dict(_args) + + _result = d.pop("result", UNSET) + result: Union[Unset, GetCompletedJobResponse200Result] + if isinstance(_result, Unset): + result = UNSET + else: + result = GetCompletedJobResponse200Result.from_dict(_result) + + logs = d.pop("logs", UNSET) + + deleted = d.pop("deleted", UNSET) + + raw_code = d.pop("raw_code", UNSET) + + canceled_by = d.pop("canceled_by", UNSET) + + canceled_reason = d.pop("canceled_reason", UNSET) + + schedule_path = d.pop("schedule_path", UNSET) + + _flow_status = d.pop("flow_status", UNSET) + flow_status: Union[Unset, GetCompletedJobResponse200FlowStatus] + if isinstance(_flow_status, Unset): + flow_status = UNSET + else: + flow_status = GetCompletedJobResponse200FlowStatus.from_dict(_flow_status) + + _raw_flow = d.pop("raw_flow", UNSET) + raw_flow: Union[Unset, GetCompletedJobResponse200RawFlow] + if isinstance(_raw_flow, Unset): + raw_flow = UNSET + else: + raw_flow = GetCompletedJobResponse200RawFlow.from_dict(_raw_flow) + + _language = d.pop("language", UNSET) + language: Union[Unset, GetCompletedJobResponse200Language] + if isinstance(_language, Unset): + language = UNSET + else: + language = GetCompletedJobResponse200Language(_language) + + get_completed_job_response_200 = cls( + id=id, + created_by=created_by, + created_at=created_at, + started_at=started_at, + duration_ms=duration_ms, + success=success, + canceled=canceled, + job_kind=job_kind, + permissioned_as=permissioned_as, + is_flow_step=is_flow_step, + is_skipped=is_skipped, + workspace_id=workspace_id, + parent_job=parent_job, + script_path=script_path, + script_hash=script_hash, + args=args, + result=result, + logs=logs, + deleted=deleted, + raw_code=raw_code, + canceled_by=canceled_by, + canceled_reason=canceled_reason, + schedule_path=schedule_path, + flow_status=flow_status, + raw_flow=raw_flow, + language=language, + ) + + get_completed_job_response_200.additional_properties = d + return get_completed_job_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_args.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_args.py new file mode 100644 index 0000000000..c7d1a82904 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_args.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="GetCompletedJobResponse200Args") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200Args: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + get_completed_job_response_200_args = cls() + + get_completed_job_response_200_args.additional_properties = d + return get_completed_job_response_200_args + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status.py new file mode 100644 index 0000000000..430ed18137 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status.py @@ -0,0 +1,106 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_completed_job_response_200_flow_status_failure_module import ( + GetCompletedJobResponse200FlowStatusFailureModule, +) +from ..models.get_completed_job_response_200_flow_status_modules_item import ( + GetCompletedJobResponse200FlowStatusModulesItem, +) +from ..models.get_completed_job_response_200_flow_status_retry import GetCompletedJobResponse200FlowStatusRetry +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200FlowStatus") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200FlowStatus: + """ + Attributes: + step (int): + modules (List[GetCompletedJobResponse200FlowStatusModulesItem]): + failure_module (GetCompletedJobResponse200FlowStatusFailureModule): + retry (Union[Unset, GetCompletedJobResponse200FlowStatusRetry]): + """ + + step: int + modules: List[GetCompletedJobResponse200FlowStatusModulesItem] + failure_module: GetCompletedJobResponse200FlowStatusFailureModule + retry: Union[Unset, GetCompletedJobResponse200FlowStatusRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + step = self.step + modules = [] + for modules_item_data in self.modules: + modules_item = modules_item_data.to_dict() + + modules.append(modules_item) + + failure_module = self.failure_module.to_dict() + + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "step": step, + "modules": modules, + "failure_module": failure_module, + } + ) + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + step = d.pop("step") + + modules = [] + _modules = d.pop("modules") + for modules_item_data in _modules: + modules_item = GetCompletedJobResponse200FlowStatusModulesItem.from_dict(modules_item_data) + + modules.append(modules_item) + + failure_module = GetCompletedJobResponse200FlowStatusFailureModule.from_dict(d.pop("failure_module")) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, GetCompletedJobResponse200FlowStatusRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = GetCompletedJobResponse200FlowStatusRetry.from_dict(_retry) + + get_completed_job_response_200_flow_status = cls( + step=step, + modules=modules, + failure_module=failure_module, + retry=retry, + ) + + get_completed_job_response_200_flow_status.additional_properties = d + return get_completed_job_response_200_flow_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_failure_module.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_failure_module.py new file mode 100644 index 0000000000..6224061722 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_failure_module.py @@ -0,0 +1,108 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.get_completed_job_response_200_flow_status_failure_module_iterator import ( + GetCompletedJobResponse200FlowStatusFailureModuleIterator, +) +from ..models.get_completed_job_response_200_flow_status_failure_module_type import ( + GetCompletedJobResponse200FlowStatusFailureModuleType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200FlowStatusFailureModule") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200FlowStatusFailureModule: + """ + Attributes: + type (GetCompletedJobResponse200FlowStatusFailureModuleType): + job (Union[Unset, str]): + count (Union[Unset, int]): + iterator (Union[Unset, GetCompletedJobResponse200FlowStatusFailureModuleIterator]): + forloop_jobs (Union[Unset, List[str]]): + """ + + type: GetCompletedJobResponse200FlowStatusFailureModuleType + job: Union[Unset, str] = UNSET + count: Union[Unset, int] = UNSET + iterator: Union[Unset, GetCompletedJobResponse200FlowStatusFailureModuleIterator] = UNSET + forloop_jobs: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + job = self.job + count = self.count + iterator: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.iterator, Unset): + iterator = self.iterator.to_dict() + + forloop_jobs: Union[Unset, List[str]] = UNSET + if not isinstance(self.forloop_jobs, Unset): + forloop_jobs = self.forloop_jobs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if job is not UNSET: + field_dict["job"] = job + if count is not UNSET: + field_dict["count"] = count + if iterator is not UNSET: + field_dict["iterator"] = iterator + if forloop_jobs is not UNSET: + field_dict["forloop_jobs"] = forloop_jobs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetCompletedJobResponse200FlowStatusFailureModuleType(d.pop("type")) + + job = d.pop("job", UNSET) + + count = d.pop("count", UNSET) + + _iterator = d.pop("iterator", UNSET) + iterator: Union[Unset, GetCompletedJobResponse200FlowStatusFailureModuleIterator] + if isinstance(_iterator, Unset): + iterator = UNSET + else: + iterator = GetCompletedJobResponse200FlowStatusFailureModuleIterator.from_dict(_iterator) + + forloop_jobs = cast(List[str], d.pop("forloop_jobs", UNSET)) + + get_completed_job_response_200_flow_status_failure_module = cls( + type=type, + job=job, + count=count, + iterator=iterator, + forloop_jobs=forloop_jobs, + ) + + get_completed_job_response_200_flow_status_failure_module.additional_properties = d + return get_completed_job_response_200_flow_status_failure_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_failure_module_iterator.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_failure_module_iterator.py new file mode 100644 index 0000000000..edc3459ea7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_failure_module_iterator.py @@ -0,0 +1,76 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200FlowStatusFailureModuleIterator") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200FlowStatusFailureModuleIterator: + """ + Attributes: + index (Union[Unset, int]): + itered (Union[Unset, List[Any]]): + args (Union[Unset, Any]): + """ + + index: Union[Unset, int] = UNSET + itered: Union[Unset, List[Any]] = UNSET + args: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + index = self.index + itered: Union[Unset, List[Any]] = UNSET + if not isinstance(self.itered, Unset): + itered = self.itered + + args = self.args + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if index is not UNSET: + field_dict["index"] = index + if itered is not UNSET: + field_dict["itered"] = itered + if args is not UNSET: + field_dict["args"] = args + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + index = d.pop("index", UNSET) + + itered = cast(List[Any], d.pop("itered", UNSET)) + + args = d.pop("args", UNSET) + + get_completed_job_response_200_flow_status_failure_module_iterator = cls( + index=index, + itered=itered, + args=args, + ) + + get_completed_job_response_200_flow_status_failure_module_iterator.additional_properties = d + return get_completed_job_response_200_flow_status_failure_module_iterator + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_failure_module_type.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_failure_module_type.py new file mode 100644 index 0000000000..ba6b34dc83 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_failure_module_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class GetCompletedJobResponse200FlowStatusFailureModuleType(str, Enum): + WAITINGFORPRIORSTEPS = "WaitingForPriorSteps" + WAITINGFOREVENT = "WaitingForEvent" + WAITINGFOREXECUTOR = "WaitingForExecutor" + INPROGRESS = "InProgress" + SUCCESS = "Success" + FAILURE = "Failure" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_modules_item.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_modules_item.py new file mode 100644 index 0000000000..25453cd9a4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_modules_item.py @@ -0,0 +1,108 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.get_completed_job_response_200_flow_status_modules_item_iterator import ( + GetCompletedJobResponse200FlowStatusModulesItemIterator, +) +from ..models.get_completed_job_response_200_flow_status_modules_item_type import ( + GetCompletedJobResponse200FlowStatusModulesItemType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200FlowStatusModulesItem") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200FlowStatusModulesItem: + """ + Attributes: + type (GetCompletedJobResponse200FlowStatusModulesItemType): + job (Union[Unset, str]): + count (Union[Unset, int]): + iterator (Union[Unset, GetCompletedJobResponse200FlowStatusModulesItemIterator]): + forloop_jobs (Union[Unset, List[str]]): + """ + + type: GetCompletedJobResponse200FlowStatusModulesItemType + job: Union[Unset, str] = UNSET + count: Union[Unset, int] = UNSET + iterator: Union[Unset, GetCompletedJobResponse200FlowStatusModulesItemIterator] = UNSET + forloop_jobs: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + job = self.job + count = self.count + iterator: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.iterator, Unset): + iterator = self.iterator.to_dict() + + forloop_jobs: Union[Unset, List[str]] = UNSET + if not isinstance(self.forloop_jobs, Unset): + forloop_jobs = self.forloop_jobs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if job is not UNSET: + field_dict["job"] = job + if count is not UNSET: + field_dict["count"] = count + if iterator is not UNSET: + field_dict["iterator"] = iterator + if forloop_jobs is not UNSET: + field_dict["forloop_jobs"] = forloop_jobs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetCompletedJobResponse200FlowStatusModulesItemType(d.pop("type")) + + job = d.pop("job", UNSET) + + count = d.pop("count", UNSET) + + _iterator = d.pop("iterator", UNSET) + iterator: Union[Unset, GetCompletedJobResponse200FlowStatusModulesItemIterator] + if isinstance(_iterator, Unset): + iterator = UNSET + else: + iterator = GetCompletedJobResponse200FlowStatusModulesItemIterator.from_dict(_iterator) + + forloop_jobs = cast(List[str], d.pop("forloop_jobs", UNSET)) + + get_completed_job_response_200_flow_status_modules_item = cls( + type=type, + job=job, + count=count, + iterator=iterator, + forloop_jobs=forloop_jobs, + ) + + get_completed_job_response_200_flow_status_modules_item.additional_properties = d + return get_completed_job_response_200_flow_status_modules_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_modules_item_iterator.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_modules_item_iterator.py new file mode 100644 index 0000000000..da6b90a0d4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_modules_item_iterator.py @@ -0,0 +1,76 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200FlowStatusModulesItemIterator") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200FlowStatusModulesItemIterator: + """ + Attributes: + index (Union[Unset, int]): + itered (Union[Unset, List[Any]]): + args (Union[Unset, Any]): + """ + + index: Union[Unset, int] = UNSET + itered: Union[Unset, List[Any]] = UNSET + args: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + index = self.index + itered: Union[Unset, List[Any]] = UNSET + if not isinstance(self.itered, Unset): + itered = self.itered + + args = self.args + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if index is not UNSET: + field_dict["index"] = index + if itered is not UNSET: + field_dict["itered"] = itered + if args is not UNSET: + field_dict["args"] = args + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + index = d.pop("index", UNSET) + + itered = cast(List[Any], d.pop("itered", UNSET)) + + args = d.pop("args", UNSET) + + get_completed_job_response_200_flow_status_modules_item_iterator = cls( + index=index, + itered=itered, + args=args, + ) + + get_completed_job_response_200_flow_status_modules_item_iterator.additional_properties = d + return get_completed_job_response_200_flow_status_modules_item_iterator + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_modules_item_type.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_modules_item_type.py new file mode 100644 index 0000000000..d4cdf7efa5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_modules_item_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class GetCompletedJobResponse200FlowStatusModulesItemType(str, Enum): + WAITINGFORPRIORSTEPS = "WaitingForPriorSteps" + WAITINGFOREVENT = "WaitingForEvent" + WAITINGFOREXECUTOR = "WaitingForExecutor" + INPROGRESS = "InProgress" + SUCCESS = "Success" + FAILURE = "Failure" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_retry.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_retry.py new file mode 100644 index 0000000000..4e004e4e41 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_flow_status_retry.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200FlowStatusRetry") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200FlowStatusRetry: + """ + Attributes: + fail_count (Union[Unset, int]): + """ + + fail_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + fail_count = self.fail_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if fail_count is not UNSET: + field_dict["fail_count"] = fail_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + fail_count = d.pop("fail_count", UNSET) + + get_completed_job_response_200_flow_status_retry = cls( + fail_count=fail_count, + ) + + get_completed_job_response_200_flow_status_retry.additional_properties = d + return get_completed_job_response_200_flow_status_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_job_kind.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_job_kind.py new file mode 100644 index 0000000000..84f83eb521 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_job_kind.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class GetCompletedJobResponse200JobKind(str, Enum): + SCRIPT = "script" + PREVIEW = "preview" + DEPENDENCIES = "dependencies" + FLOW = "flow" + FLOWPREVIEW = "flowpreview" + SCRIPT_HUB = "script_hub" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_language.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_language.py new file mode 100644 index 0000000000..8972ed441a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class GetCompletedJobResponse200Language(str, Enum): + PYTHON3 = "python3" + DENO = "deno" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow.py new file mode 100644 index 0000000000..ee18b2bad4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow.py @@ -0,0 +1,97 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_completed_job_response_200_raw_flow_failure_module import ( + GetCompletedJobResponse200RawFlowFailureModule, +) +from ..models.get_completed_job_response_200_raw_flow_modules_item import GetCompletedJobResponse200RawFlowModulesItem +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlow") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlow: + """ + Attributes: + modules (List[GetCompletedJobResponse200RawFlowModulesItem]): + failure_module (Union[Unset, GetCompletedJobResponse200RawFlowFailureModule]): + same_worker (Union[Unset, bool]): + """ + + modules: List[GetCompletedJobResponse200RawFlowModulesItem] + failure_module: Union[Unset, GetCompletedJobResponse200RawFlowFailureModule] = UNSET + same_worker: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + modules = [] + for modules_item_data in self.modules: + modules_item = modules_item_data.to_dict() + + modules.append(modules_item) + + failure_module: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.failure_module, Unset): + failure_module = self.failure_module.to_dict() + + same_worker = self.same_worker + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "modules": modules, + } + ) + if failure_module is not UNSET: + field_dict["failure_module"] = failure_module + if same_worker is not UNSET: + field_dict["same_worker"] = same_worker + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + modules = [] + _modules = d.pop("modules") + for modules_item_data in _modules: + modules_item = GetCompletedJobResponse200RawFlowModulesItem.from_dict(modules_item_data) + + modules.append(modules_item) + + _failure_module = d.pop("failure_module", UNSET) + failure_module: Union[Unset, GetCompletedJobResponse200RawFlowFailureModule] + if isinstance(_failure_module, Unset): + failure_module = UNSET + else: + failure_module = GetCompletedJobResponse200RawFlowFailureModule.from_dict(_failure_module) + + same_worker = d.pop("same_worker", UNSET) + + get_completed_job_response_200_raw_flow = cls( + modules=modules, + failure_module=failure_module, + same_worker=same_worker, + ) + + get_completed_job_response_200_raw_flow.additional_properties = d + return get_completed_job_response_200_raw_flow + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module.py new file mode 100644 index 0000000000..9052a8fa59 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module.py @@ -0,0 +1,259 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_completed_job_response_200_raw_flow_failure_module_input_transforms import ( + GetCompletedJobResponse200RawFlowFailureModuleInputTransforms, +) +from ..models.get_completed_job_response_200_raw_flow_failure_module_retry import ( + GetCompletedJobResponse200RawFlowFailureModuleRetry, +) +from ..models.get_completed_job_response_200_raw_flow_failure_module_sleep_type_0 import ( + GetCompletedJobResponse200RawFlowFailureModuleSleepType0, +) +from ..models.get_completed_job_response_200_raw_flow_failure_module_sleep_type_1 import ( + GetCompletedJobResponse200RawFlowFailureModuleSleepType1, +) +from ..models.get_completed_job_response_200_raw_flow_failure_module_stop_after_if import ( + GetCompletedJobResponse200RawFlowFailureModuleStopAfterIf, +) +from ..models.get_completed_job_response_200_raw_flow_failure_module_value_type_0 import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType0, +) +from ..models.get_completed_job_response_200_raw_flow_failure_module_value_type_1 import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType1, +) +from ..models.get_completed_job_response_200_raw_flow_failure_module_value_type_2 import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType2, +) +from ..models.get_completed_job_response_200_raw_flow_failure_module_value_type_3 import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType3, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowFailureModule") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowFailureModule: + """ + Attributes: + input_transforms (GetCompletedJobResponse200RawFlowFailureModuleInputTransforms): + value (Union[GetCompletedJobResponse200RawFlowFailureModuleValueType0, + GetCompletedJobResponse200RawFlowFailureModuleValueType1, + GetCompletedJobResponse200RawFlowFailureModuleValueType2, + GetCompletedJobResponse200RawFlowFailureModuleValueType3]): + stop_after_if (Union[Unset, GetCompletedJobResponse200RawFlowFailureModuleStopAfterIf]): + sleep (Union[GetCompletedJobResponse200RawFlowFailureModuleSleepType0, + GetCompletedJobResponse200RawFlowFailureModuleSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, GetCompletedJobResponse200RawFlowFailureModuleRetry]): + """ + + input_transforms: GetCompletedJobResponse200RawFlowFailureModuleInputTransforms + value: Union[ + GetCompletedJobResponse200RawFlowFailureModuleValueType0, + GetCompletedJobResponse200RawFlowFailureModuleValueType1, + GetCompletedJobResponse200RawFlowFailureModuleValueType2, + GetCompletedJobResponse200RawFlowFailureModuleValueType3, + ] + stop_after_if: Union[Unset, GetCompletedJobResponse200RawFlowFailureModuleStopAfterIf] = UNSET + sleep: Union[ + GetCompletedJobResponse200RawFlowFailureModuleSleepType0, + GetCompletedJobResponse200RawFlowFailureModuleSleepType1, + Unset, + ] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, GetCompletedJobResponse200RawFlowFailureModuleRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, GetCompletedJobResponse200RawFlowFailureModuleValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, GetCompletedJobResponse200RawFlowFailureModuleValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, GetCompletedJobResponse200RawFlowFailureModuleValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, GetCompletedJobResponse200RawFlowFailureModuleSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = GetCompletedJobResponse200RawFlowFailureModuleInputTransforms.from_dict( + d.pop("input_transforms") + ) + + def _parse_value( + data: object, + ) -> Union[ + GetCompletedJobResponse200RawFlowFailureModuleValueType0, + GetCompletedJobResponse200RawFlowFailureModuleValueType1, + GetCompletedJobResponse200RawFlowFailureModuleValueType2, + GetCompletedJobResponse200RawFlowFailureModuleValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = GetCompletedJobResponse200RawFlowFailureModuleValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = GetCompletedJobResponse200RawFlowFailureModuleValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = GetCompletedJobResponse200RawFlowFailureModuleValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = GetCompletedJobResponse200RawFlowFailureModuleValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, GetCompletedJobResponse200RawFlowFailureModuleStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = GetCompletedJobResponse200RawFlowFailureModuleStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[ + GetCompletedJobResponse200RawFlowFailureModuleSleepType0, + GetCompletedJobResponse200RawFlowFailureModuleSleepType1, + Unset, + ]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, GetCompletedJobResponse200RawFlowFailureModuleSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = GetCompletedJobResponse200RawFlowFailureModuleSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, GetCompletedJobResponse200RawFlowFailureModuleSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = GetCompletedJobResponse200RawFlowFailureModuleSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, GetCompletedJobResponse200RawFlowFailureModuleRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = GetCompletedJobResponse200RawFlowFailureModuleRetry.from_dict(_retry) + + get_completed_job_response_200_raw_flow_failure_module = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + get_completed_job_response_200_raw_flow_failure_module.additional_properties = d + return get_completed_job_response_200_raw_flow_failure_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_input_transforms.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_input_transforms.py new file mode 100644 index 0000000000..22dd63646b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_input_transforms.py @@ -0,0 +1,111 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0 import ( + GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0, +) +from ..models.get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1 import ( + GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowFailureModuleInputTransforms") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowFailureModuleInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0, + GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + get_completed_job_response_200_raw_flow_failure_module_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0, + GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0.from_dict( + data + ) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1.from_dict(data) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + get_completed_job_response_200_raw_flow_failure_module_input_transforms.additional_properties = ( + additional_properties + ) + return get_completed_job_response_200_raw_flow_failure_module_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0, + GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0, + GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..33a0a3ff5f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0_type import ( + GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0.additional_properties = ( + d + ) + return get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..b337be22f5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..1d73318a6a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1_type import ( + GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1.additional_properties = ( + d + ) + return get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..d1c02dbce3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetCompletedJobResponse200RawFlowFailureModuleInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_retry.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_retry.py new file mode 100644 index 0000000000..d649aeafbd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_retry.py @@ -0,0 +1,86 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_completed_job_response_200_raw_flow_failure_module_retry_constant import ( + GetCompletedJobResponse200RawFlowFailureModuleRetryConstant, +) +from ..models.get_completed_job_response_200_raw_flow_failure_module_retry_exponential import ( + GetCompletedJobResponse200RawFlowFailureModuleRetryExponential, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowFailureModuleRetry") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowFailureModuleRetry: + """ + Attributes: + constant (Union[Unset, GetCompletedJobResponse200RawFlowFailureModuleRetryConstant]): + exponential (Union[Unset, GetCompletedJobResponse200RawFlowFailureModuleRetryExponential]): + """ + + constant: Union[Unset, GetCompletedJobResponse200RawFlowFailureModuleRetryConstant] = UNSET + exponential: Union[Unset, GetCompletedJobResponse200RawFlowFailureModuleRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, GetCompletedJobResponse200RawFlowFailureModuleRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = GetCompletedJobResponse200RawFlowFailureModuleRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, GetCompletedJobResponse200RawFlowFailureModuleRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = GetCompletedJobResponse200RawFlowFailureModuleRetryExponential.from_dict(_exponential) + + get_completed_job_response_200_raw_flow_failure_module_retry = cls( + constant=constant, + exponential=exponential, + ) + + get_completed_job_response_200_raw_flow_failure_module_retry.additional_properties = d + return get_completed_job_response_200_raw_flow_failure_module_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_retry_constant.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_retry_constant.py new file mode 100644 index 0000000000..cd73cc98d7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowFailureModuleRetryConstant") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowFailureModuleRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + get_completed_job_response_200_raw_flow_failure_module_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + get_completed_job_response_200_raw_flow_failure_module_retry_constant.additional_properties = d + return get_completed_job_response_200_raw_flow_failure_module_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_retry_exponential.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_retry_exponential.py new file mode 100644 index 0000000000..989f729060 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowFailureModuleRetryExponential") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowFailureModuleRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + get_completed_job_response_200_raw_flow_failure_module_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + get_completed_job_response_200_raw_flow_failure_module_retry_exponential.additional_properties = d + return get_completed_job_response_200_raw_flow_failure_module_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_sleep_type_0.py new file mode 100644 index 0000000000..b4ae58355a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_sleep_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_completed_job_response_200_raw_flow_failure_module_sleep_type_0_type import ( + GetCompletedJobResponse200RawFlowFailureModuleSleepType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowFailureModuleSleepType0") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowFailureModuleSleepType0: + """ + Attributes: + type (GetCompletedJobResponse200RawFlowFailureModuleSleepType0Type): + value (Union[Unset, Any]): + """ + + type: GetCompletedJobResponse200RawFlowFailureModuleSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetCompletedJobResponse200RawFlowFailureModuleSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + get_completed_job_response_200_raw_flow_failure_module_sleep_type_0 = cls( + type=type, + value=value, + ) + + get_completed_job_response_200_raw_flow_failure_module_sleep_type_0.additional_properties = d + return get_completed_job_response_200_raw_flow_failure_module_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_sleep_type_0_type.py new file mode 100644 index 0000000000..78d2676ce6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetCompletedJobResponse200RawFlowFailureModuleSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_sleep_type_1.py new file mode 100644 index 0000000000..61bc81a111 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_sleep_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_completed_job_response_200_raw_flow_failure_module_sleep_type_1_type import ( + GetCompletedJobResponse200RawFlowFailureModuleSleepType1Type, +) + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowFailureModuleSleepType1") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowFailureModuleSleepType1: + """ + Attributes: + expr (str): + type (GetCompletedJobResponse200RawFlowFailureModuleSleepType1Type): + """ + + expr: str + type: GetCompletedJobResponse200RawFlowFailureModuleSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = GetCompletedJobResponse200RawFlowFailureModuleSleepType1Type(d.pop("type")) + + get_completed_job_response_200_raw_flow_failure_module_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + get_completed_job_response_200_raw_flow_failure_module_sleep_type_1.additional_properties = d + return get_completed_job_response_200_raw_flow_failure_module_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_sleep_type_1_type.py new file mode 100644 index 0000000000..6dcbba26c1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetCompletedJobResponse200RawFlowFailureModuleSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_stop_after_if.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_stop_after_if.py new file mode 100644 index 0000000000..ef401ef2f7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowFailureModuleStopAfterIf") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowFailureModuleStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + get_completed_job_response_200_raw_flow_failure_module_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + get_completed_job_response_200_raw_flow_failure_module_stop_after_if.additional_properties = d + return get_completed_job_response_200_raw_flow_failure_module_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_0.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_0.py new file mode 100644 index 0000000000..eb97a73e7b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_completed_job_response_200_raw_flow_failure_module_value_type_0_language import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowFailureModuleValueType0") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowFailureModuleValueType0: + """ + Attributes: + content (str): + language (GetCompletedJobResponse200RawFlowFailureModuleValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: GetCompletedJobResponse200RawFlowFailureModuleValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = GetCompletedJobResponse200RawFlowFailureModuleValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + get_completed_job_response_200_raw_flow_failure_module_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + get_completed_job_response_200_raw_flow_failure_module_value_type_0.additional_properties = d + return get_completed_job_response_200_raw_flow_failure_module_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_0_language.py new file mode 100644 index 0000000000..5d87fb8f5f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class GetCompletedJobResponse200RawFlowFailureModuleValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_1.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_1.py new file mode 100644 index 0000000000..def26a95a2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_completed_job_response_200_raw_flow_failure_module_value_type_1_type import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType1Type, +) + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowFailureModuleValueType1") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowFailureModuleValueType1: + """ + Attributes: + path (str): + type (GetCompletedJobResponse200RawFlowFailureModuleValueType1Type): + """ + + path: str + type: GetCompletedJobResponse200RawFlowFailureModuleValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = GetCompletedJobResponse200RawFlowFailureModuleValueType1Type(d.pop("type")) + + get_completed_job_response_200_raw_flow_failure_module_value_type_1 = cls( + path=path, + type=type, + ) + + get_completed_job_response_200_raw_flow_failure_module_value_type_1.additional_properties = d + return get_completed_job_response_200_raw_flow_failure_module_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_1_type.py new file mode 100644 index 0000000000..1054deabcd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetCompletedJobResponse200RawFlowFailureModuleValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2.py new file mode 100644 index 0000000000..0348664020 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2.py @@ -0,0 +1,112 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0 import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0, +) +from ..models.get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1 import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1, +) +from ..models.get_completed_job_response_200_raw_flow_failure_module_value_type_2_type import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType2Type, +) + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowFailureModuleValueType2") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowFailureModuleValueType2: + """ + Attributes: + iterator (Union[GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0, + GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1]): + skip_failures (bool): + type (GetCompletedJobResponse200RawFlowFailureModuleValueType2Type): + """ + + iterator: Union[ + GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0, + GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1, + ] + skip_failures: bool + type: GetCompletedJobResponse200RawFlowFailureModuleValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0, + GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = GetCompletedJobResponse200RawFlowFailureModuleValueType2Type(d.pop("type")) + + get_completed_job_response_200_raw_flow_failure_module_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + get_completed_job_response_200_raw_flow_failure_module_value_type_2.additional_properties = d + return get_completed_job_response_200_raw_flow_failure_module_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..c1ba142153 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0_type import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0: + """ + Attributes: + type (GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0.additional_properties = d + return get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..439d8e89db --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..a6592ecc57 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1_type import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1: + """ + Attributes: + expr (str): + type (GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1Type): + """ + + expr: str + type: GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1Type(d.pop("type")) + + get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1.additional_properties = d + return get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..8a758c0d24 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetCompletedJobResponse200RawFlowFailureModuleValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2_type.py new file mode 100644 index 0000000000..eb1bdc1769 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetCompletedJobResponse200RawFlowFailureModuleValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_3.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_3.py new file mode 100644 index 0000000000..a36065e7c6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_3.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_completed_job_response_200_raw_flow_failure_module_value_type_3_type import ( + GetCompletedJobResponse200RawFlowFailureModuleValueType3Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowFailureModuleValueType3") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowFailureModuleValueType3: + """ + Attributes: + type (GetCompletedJobResponse200RawFlowFailureModuleValueType3Type): + path (Union[Unset, str]): + """ + + type: GetCompletedJobResponse200RawFlowFailureModuleValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetCompletedJobResponse200RawFlowFailureModuleValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + get_completed_job_response_200_raw_flow_failure_module_value_type_3 = cls( + type=type, + path=path, + ) + + get_completed_job_response_200_raw_flow_failure_module_value_type_3.additional_properties = d + return get_completed_job_response_200_raw_flow_failure_module_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_3_type.py new file mode 100644 index 0000000000..80ae2b945e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_failure_module_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetCompletedJobResponse200RawFlowFailureModuleValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item.py new file mode 100644 index 0000000000..e7c10dbb01 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item.py @@ -0,0 +1,258 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_completed_job_response_200_raw_flow_modules_item_input_transforms import ( + GetCompletedJobResponse200RawFlowModulesItemInputTransforms, +) +from ..models.get_completed_job_response_200_raw_flow_modules_item_retry import ( + GetCompletedJobResponse200RawFlowModulesItemRetry, +) +from ..models.get_completed_job_response_200_raw_flow_modules_item_sleep_type_0 import ( + GetCompletedJobResponse200RawFlowModulesItemSleepType0, +) +from ..models.get_completed_job_response_200_raw_flow_modules_item_sleep_type_1 import ( + GetCompletedJobResponse200RawFlowModulesItemSleepType1, +) +from ..models.get_completed_job_response_200_raw_flow_modules_item_stop_after_if import ( + GetCompletedJobResponse200RawFlowModulesItemStopAfterIf, +) +from ..models.get_completed_job_response_200_raw_flow_modules_item_value_type_0 import ( + GetCompletedJobResponse200RawFlowModulesItemValueType0, +) +from ..models.get_completed_job_response_200_raw_flow_modules_item_value_type_1 import ( + GetCompletedJobResponse200RawFlowModulesItemValueType1, +) +from ..models.get_completed_job_response_200_raw_flow_modules_item_value_type_2 import ( + GetCompletedJobResponse200RawFlowModulesItemValueType2, +) +from ..models.get_completed_job_response_200_raw_flow_modules_item_value_type_3 import ( + GetCompletedJobResponse200RawFlowModulesItemValueType3, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowModulesItem") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowModulesItem: + """ + Attributes: + input_transforms (GetCompletedJobResponse200RawFlowModulesItemInputTransforms): + value (Union[GetCompletedJobResponse200RawFlowModulesItemValueType0, + GetCompletedJobResponse200RawFlowModulesItemValueType1, GetCompletedJobResponse200RawFlowModulesItemValueType2, + GetCompletedJobResponse200RawFlowModulesItemValueType3]): + stop_after_if (Union[Unset, GetCompletedJobResponse200RawFlowModulesItemStopAfterIf]): + sleep (Union[GetCompletedJobResponse200RawFlowModulesItemSleepType0, + GetCompletedJobResponse200RawFlowModulesItemSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, GetCompletedJobResponse200RawFlowModulesItemRetry]): + """ + + input_transforms: GetCompletedJobResponse200RawFlowModulesItemInputTransforms + value: Union[ + GetCompletedJobResponse200RawFlowModulesItemValueType0, + GetCompletedJobResponse200RawFlowModulesItemValueType1, + GetCompletedJobResponse200RawFlowModulesItemValueType2, + GetCompletedJobResponse200RawFlowModulesItemValueType3, + ] + stop_after_if: Union[Unset, GetCompletedJobResponse200RawFlowModulesItemStopAfterIf] = UNSET + sleep: Union[ + GetCompletedJobResponse200RawFlowModulesItemSleepType0, + GetCompletedJobResponse200RawFlowModulesItemSleepType1, + Unset, + ] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, GetCompletedJobResponse200RawFlowModulesItemRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, GetCompletedJobResponse200RawFlowModulesItemValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, GetCompletedJobResponse200RawFlowModulesItemValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, GetCompletedJobResponse200RawFlowModulesItemValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, GetCompletedJobResponse200RawFlowModulesItemSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = GetCompletedJobResponse200RawFlowModulesItemInputTransforms.from_dict( + d.pop("input_transforms") + ) + + def _parse_value( + data: object, + ) -> Union[ + GetCompletedJobResponse200RawFlowModulesItemValueType0, + GetCompletedJobResponse200RawFlowModulesItemValueType1, + GetCompletedJobResponse200RawFlowModulesItemValueType2, + GetCompletedJobResponse200RawFlowModulesItemValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = GetCompletedJobResponse200RawFlowModulesItemValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = GetCompletedJobResponse200RawFlowModulesItemValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = GetCompletedJobResponse200RawFlowModulesItemValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = GetCompletedJobResponse200RawFlowModulesItemValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, GetCompletedJobResponse200RawFlowModulesItemStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = GetCompletedJobResponse200RawFlowModulesItemStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[ + GetCompletedJobResponse200RawFlowModulesItemSleepType0, + GetCompletedJobResponse200RawFlowModulesItemSleepType1, + Unset, + ]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, GetCompletedJobResponse200RawFlowModulesItemSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = GetCompletedJobResponse200RawFlowModulesItemSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, GetCompletedJobResponse200RawFlowModulesItemSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = GetCompletedJobResponse200RawFlowModulesItemSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, GetCompletedJobResponse200RawFlowModulesItemRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = GetCompletedJobResponse200RawFlowModulesItemRetry.from_dict(_retry) + + get_completed_job_response_200_raw_flow_modules_item = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + get_completed_job_response_200_raw_flow_modules_item.additional_properties = d + return get_completed_job_response_200_raw_flow_modules_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_input_transforms.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_input_transforms.py new file mode 100644 index 0000000000..4bbc29d83c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_input_transforms.py @@ -0,0 +1,111 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0 import ( + GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0, +) +from ..models.get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1 import ( + GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowModulesItemInputTransforms") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowModulesItemInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0, + GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + get_completed_job_response_200_raw_flow_modules_item_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0, + GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0.from_dict( + data + ) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1.from_dict(data) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + get_completed_job_response_200_raw_flow_modules_item_input_transforms.additional_properties = ( + additional_properties + ) + return get_completed_job_response_200_raw_flow_modules_item_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0, + GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0, + GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..fbdfbd19c0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0_type import ( + GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0.additional_properties = ( + d + ) + return get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..ca80eef812 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..73d9d070a5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1_type import ( + GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1.additional_properties = ( + d + ) + return get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..0b25261755 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetCompletedJobResponse200RawFlowModulesItemInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_retry.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_retry.py new file mode 100644 index 0000000000..cab4bef971 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_retry.py @@ -0,0 +1,86 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_completed_job_response_200_raw_flow_modules_item_retry_constant import ( + GetCompletedJobResponse200RawFlowModulesItemRetryConstant, +) +from ..models.get_completed_job_response_200_raw_flow_modules_item_retry_exponential import ( + GetCompletedJobResponse200RawFlowModulesItemRetryExponential, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowModulesItemRetry") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowModulesItemRetry: + """ + Attributes: + constant (Union[Unset, GetCompletedJobResponse200RawFlowModulesItemRetryConstant]): + exponential (Union[Unset, GetCompletedJobResponse200RawFlowModulesItemRetryExponential]): + """ + + constant: Union[Unset, GetCompletedJobResponse200RawFlowModulesItemRetryConstant] = UNSET + exponential: Union[Unset, GetCompletedJobResponse200RawFlowModulesItemRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, GetCompletedJobResponse200RawFlowModulesItemRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = GetCompletedJobResponse200RawFlowModulesItemRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, GetCompletedJobResponse200RawFlowModulesItemRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = GetCompletedJobResponse200RawFlowModulesItemRetryExponential.from_dict(_exponential) + + get_completed_job_response_200_raw_flow_modules_item_retry = cls( + constant=constant, + exponential=exponential, + ) + + get_completed_job_response_200_raw_flow_modules_item_retry.additional_properties = d + return get_completed_job_response_200_raw_flow_modules_item_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_retry_constant.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_retry_constant.py new file mode 100644 index 0000000000..c33b210b7b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowModulesItemRetryConstant") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowModulesItemRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + get_completed_job_response_200_raw_flow_modules_item_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + get_completed_job_response_200_raw_flow_modules_item_retry_constant.additional_properties = d + return get_completed_job_response_200_raw_flow_modules_item_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_retry_exponential.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_retry_exponential.py new file mode 100644 index 0000000000..a19474b6cb --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowModulesItemRetryExponential") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowModulesItemRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + get_completed_job_response_200_raw_flow_modules_item_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + get_completed_job_response_200_raw_flow_modules_item_retry_exponential.additional_properties = d + return get_completed_job_response_200_raw_flow_modules_item_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_sleep_type_0.py new file mode 100644 index 0000000000..adcc5b8a28 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_sleep_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_completed_job_response_200_raw_flow_modules_item_sleep_type_0_type import ( + GetCompletedJobResponse200RawFlowModulesItemSleepType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowModulesItemSleepType0") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowModulesItemSleepType0: + """ + Attributes: + type (GetCompletedJobResponse200RawFlowModulesItemSleepType0Type): + value (Union[Unset, Any]): + """ + + type: GetCompletedJobResponse200RawFlowModulesItemSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetCompletedJobResponse200RawFlowModulesItemSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + get_completed_job_response_200_raw_flow_modules_item_sleep_type_0 = cls( + type=type, + value=value, + ) + + get_completed_job_response_200_raw_flow_modules_item_sleep_type_0.additional_properties = d + return get_completed_job_response_200_raw_flow_modules_item_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_sleep_type_0_type.py new file mode 100644 index 0000000000..6db5c98398 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetCompletedJobResponse200RawFlowModulesItemSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_sleep_type_1.py new file mode 100644 index 0000000000..de385afc56 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_sleep_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_completed_job_response_200_raw_flow_modules_item_sleep_type_1_type import ( + GetCompletedJobResponse200RawFlowModulesItemSleepType1Type, +) + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowModulesItemSleepType1") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowModulesItemSleepType1: + """ + Attributes: + expr (str): + type (GetCompletedJobResponse200RawFlowModulesItemSleepType1Type): + """ + + expr: str + type: GetCompletedJobResponse200RawFlowModulesItemSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = GetCompletedJobResponse200RawFlowModulesItemSleepType1Type(d.pop("type")) + + get_completed_job_response_200_raw_flow_modules_item_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + get_completed_job_response_200_raw_flow_modules_item_sleep_type_1.additional_properties = d + return get_completed_job_response_200_raw_flow_modules_item_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_sleep_type_1_type.py new file mode 100644 index 0000000000..224f4ecebc --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetCompletedJobResponse200RawFlowModulesItemSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_stop_after_if.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_stop_after_if.py new file mode 100644 index 0000000000..d633cf3a36 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowModulesItemStopAfterIf") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowModulesItemStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + get_completed_job_response_200_raw_flow_modules_item_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + get_completed_job_response_200_raw_flow_modules_item_stop_after_if.additional_properties = d + return get_completed_job_response_200_raw_flow_modules_item_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_0.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_0.py new file mode 100644 index 0000000000..122d4d19cd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_completed_job_response_200_raw_flow_modules_item_value_type_0_language import ( + GetCompletedJobResponse200RawFlowModulesItemValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowModulesItemValueType0") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowModulesItemValueType0: + """ + Attributes: + content (str): + language (GetCompletedJobResponse200RawFlowModulesItemValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: GetCompletedJobResponse200RawFlowModulesItemValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = GetCompletedJobResponse200RawFlowModulesItemValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + get_completed_job_response_200_raw_flow_modules_item_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + get_completed_job_response_200_raw_flow_modules_item_value_type_0.additional_properties = d + return get_completed_job_response_200_raw_flow_modules_item_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_0_language.py new file mode 100644 index 0000000000..760cfcb1ca --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class GetCompletedJobResponse200RawFlowModulesItemValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_1.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_1.py new file mode 100644 index 0000000000..1d5c7ef52b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_completed_job_response_200_raw_flow_modules_item_value_type_1_type import ( + GetCompletedJobResponse200RawFlowModulesItemValueType1Type, +) + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowModulesItemValueType1") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowModulesItemValueType1: + """ + Attributes: + path (str): + type (GetCompletedJobResponse200RawFlowModulesItemValueType1Type): + """ + + path: str + type: GetCompletedJobResponse200RawFlowModulesItemValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = GetCompletedJobResponse200RawFlowModulesItemValueType1Type(d.pop("type")) + + get_completed_job_response_200_raw_flow_modules_item_value_type_1 = cls( + path=path, + type=type, + ) + + get_completed_job_response_200_raw_flow_modules_item_value_type_1.additional_properties = d + return get_completed_job_response_200_raw_flow_modules_item_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_1_type.py new file mode 100644 index 0000000000..1d1d25933c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetCompletedJobResponse200RawFlowModulesItemValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2.py new file mode 100644 index 0000000000..ed12dd7eb0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2.py @@ -0,0 +1,112 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0 import ( + GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0, +) +from ..models.get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1 import ( + GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1, +) +from ..models.get_completed_job_response_200_raw_flow_modules_item_value_type_2_type import ( + GetCompletedJobResponse200RawFlowModulesItemValueType2Type, +) + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowModulesItemValueType2") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowModulesItemValueType2: + """ + Attributes: + iterator (Union[GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0, + GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1]): + skip_failures (bool): + type (GetCompletedJobResponse200RawFlowModulesItemValueType2Type): + """ + + iterator: Union[ + GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0, + GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1, + ] + skip_failures: bool + type: GetCompletedJobResponse200RawFlowModulesItemValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0, + GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = GetCompletedJobResponse200RawFlowModulesItemValueType2Type(d.pop("type")) + + get_completed_job_response_200_raw_flow_modules_item_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + get_completed_job_response_200_raw_flow_modules_item_value_type_2.additional_properties = d + return get_completed_job_response_200_raw_flow_modules_item_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..d101a1e492 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0_type import ( + GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0: + """ + Attributes: + type (GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0.additional_properties = d + return get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..40b6ea1de9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..3716e5d4c4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1_type import ( + GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1: + """ + Attributes: + expr (str): + type (GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1Type): + """ + + expr: str + type: GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1Type(d.pop("type")) + + get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1.additional_properties = d + return get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..f984471de1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetCompletedJobResponse200RawFlowModulesItemValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2_type.py new file mode 100644 index 0000000000..834265607d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetCompletedJobResponse200RawFlowModulesItemValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_3.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_3.py new file mode 100644 index 0000000000..6c2d2e4c2a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_3.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_completed_job_response_200_raw_flow_modules_item_value_type_3_type import ( + GetCompletedJobResponse200RawFlowModulesItemValueType3Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCompletedJobResponse200RawFlowModulesItemValueType3") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200RawFlowModulesItemValueType3: + """ + Attributes: + type (GetCompletedJobResponse200RawFlowModulesItemValueType3Type): + path (Union[Unset, str]): + """ + + type: GetCompletedJobResponse200RawFlowModulesItemValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetCompletedJobResponse200RawFlowModulesItemValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + get_completed_job_response_200_raw_flow_modules_item_value_type_3 = cls( + type=type, + path=path, + ) + + get_completed_job_response_200_raw_flow_modules_item_value_type_3.additional_properties = d + return get_completed_job_response_200_raw_flow_modules_item_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_3_type.py new file mode 100644 index 0000000000..efc816b928 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_raw_flow_modules_item_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetCompletedJobResponse200RawFlowModulesItemValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_result.py b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_result.py new file mode 100644 index 0000000000..0647aba048 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_completed_job_response_200_result.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="GetCompletedJobResponse200Result") + + +@attr.s(auto_attribs=True) +class GetCompletedJobResponse200Result: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + get_completed_job_response_200_result = cls() + + get_completed_job_response_200_result.additional_properties = d + return get_completed_job_response_200_result + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200.py new file mode 100644 index 0000000000..1c1c4c6f4e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200.py @@ -0,0 +1,149 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.get_flow_by_path_response_200_extra_perms import GetFlowByPathResponse200ExtraPerms +from ..models.get_flow_by_path_response_200_schema import GetFlowByPathResponse200Schema +from ..models.get_flow_by_path_response_200_value import GetFlowByPathResponse200Value +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetFlowByPathResponse200") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200: + """ + Attributes: + summary (str): + value (GetFlowByPathResponse200Value): + path (str): + edited_by (str): + edited_at (datetime.datetime): + archived (bool): + extra_perms (GetFlowByPathResponse200ExtraPerms): + description (Union[Unset, str]): + schema (Union[Unset, GetFlowByPathResponse200Schema]): + workspace_id (Union[Unset, str]): + additional_properties (Union[Unset, bool]): + """ + + summary: str + value: GetFlowByPathResponse200Value + path: str + edited_by: str + edited_at: datetime.datetime + archived: bool + extra_perms: GetFlowByPathResponse200ExtraPerms + description: Union[Unset, str] = UNSET + schema: Union[Unset, GetFlowByPathResponse200Schema] = UNSET + workspace_id: Union[Unset, str] = UNSET + additional_properties: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + summary = self.summary + value = self.value.to_dict() + + path = self.path + edited_by = self.edited_by + edited_at = self.edited_at.isoformat() + + archived = self.archived + extra_perms = self.extra_perms.to_dict() + + description = self.description + schema: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.schema, Unset): + schema = self.schema.to_dict() + + workspace_id = self.workspace_id + additional_properties = self.additional_properties + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "summary": summary, + "value": value, + "path": path, + "edited_by": edited_by, + "edited_at": edited_at, + "archived": archived, + "extra_perms": extra_perms, + } + ) + if description is not UNSET: + field_dict["description"] = description + if schema is not UNSET: + field_dict["schema"] = schema + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if additional_properties is not UNSET: + field_dict["additionalProperties"] = additional_properties + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + summary = d.pop("summary") + + value = GetFlowByPathResponse200Value.from_dict(d.pop("value")) + + path = d.pop("path") + + edited_by = d.pop("edited_by") + + edited_at = isoparse(d.pop("edited_at")) + + archived = d.pop("archived") + + extra_perms = GetFlowByPathResponse200ExtraPerms.from_dict(d.pop("extra_perms")) + + description = d.pop("description", UNSET) + + _schema = d.pop("schema", UNSET) + schema: Union[Unset, GetFlowByPathResponse200Schema] + if isinstance(_schema, Unset): + schema = UNSET + else: + schema = GetFlowByPathResponse200Schema.from_dict(_schema) + + workspace_id = d.pop("workspace_id", UNSET) + + additional_properties = d.pop("additionalProperties", UNSET) + + get_flow_by_path_response_200 = cls( + summary=summary, + value=value, + path=path, + edited_by=edited_by, + edited_at=edited_at, + archived=archived, + extra_perms=extra_perms, + description=description, + schema=schema, + workspace_id=workspace_id, + additional_properties=additional_properties, + ) + + get_flow_by_path_response_200.additional_properties = d + return get_flow_by_path_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_extra_perms.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_extra_perms.py new file mode 100644 index 0000000000..dd4e4f5fd7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_extra_perms.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="GetFlowByPathResponse200ExtraPerms") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ExtraPerms: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + get_flow_by_path_response_200_extra_perms = cls() + + get_flow_by_path_response_200_extra_perms.additional_properties = d + return get_flow_by_path_response_200_extra_perms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_schema.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_schema.py new file mode 100644 index 0000000000..ddefe2a615 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_schema.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="GetFlowByPathResponse200Schema") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200Schema: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + get_flow_by_path_response_200_schema = cls() + + get_flow_by_path_response_200_schema.additional_properties = d + return get_flow_by_path_response_200_schema + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value.py new file mode 100644 index 0000000000..9df9483660 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value.py @@ -0,0 +1,95 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_flow_by_path_response_200_value_failure_module import GetFlowByPathResponse200ValueFailureModule +from ..models.get_flow_by_path_response_200_value_modules_item import GetFlowByPathResponse200ValueModulesItem +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetFlowByPathResponse200Value") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200Value: + """ + Attributes: + modules (List[GetFlowByPathResponse200ValueModulesItem]): + failure_module (Union[Unset, GetFlowByPathResponse200ValueFailureModule]): + same_worker (Union[Unset, bool]): + """ + + modules: List[GetFlowByPathResponse200ValueModulesItem] + failure_module: Union[Unset, GetFlowByPathResponse200ValueFailureModule] = UNSET + same_worker: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + modules = [] + for modules_item_data in self.modules: + modules_item = modules_item_data.to_dict() + + modules.append(modules_item) + + failure_module: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.failure_module, Unset): + failure_module = self.failure_module.to_dict() + + same_worker = self.same_worker + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "modules": modules, + } + ) + if failure_module is not UNSET: + field_dict["failure_module"] = failure_module + if same_worker is not UNSET: + field_dict["same_worker"] = same_worker + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + modules = [] + _modules = d.pop("modules") + for modules_item_data in _modules: + modules_item = GetFlowByPathResponse200ValueModulesItem.from_dict(modules_item_data) + + modules.append(modules_item) + + _failure_module = d.pop("failure_module", UNSET) + failure_module: Union[Unset, GetFlowByPathResponse200ValueFailureModule] + if isinstance(_failure_module, Unset): + failure_module = UNSET + else: + failure_module = GetFlowByPathResponse200ValueFailureModule.from_dict(_failure_module) + + same_worker = d.pop("same_worker", UNSET) + + get_flow_by_path_response_200_value = cls( + modules=modules, + failure_module=failure_module, + same_worker=same_worker, + ) + + get_flow_by_path_response_200_value.additional_properties = d + return get_flow_by_path_response_200_value + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module.py new file mode 100644 index 0000000000..12dc704037 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module.py @@ -0,0 +1,258 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_flow_by_path_response_200_value_failure_module_input_transforms import ( + GetFlowByPathResponse200ValueFailureModuleInputTransforms, +) +from ..models.get_flow_by_path_response_200_value_failure_module_retry import ( + GetFlowByPathResponse200ValueFailureModuleRetry, +) +from ..models.get_flow_by_path_response_200_value_failure_module_sleep_type_0 import ( + GetFlowByPathResponse200ValueFailureModuleSleepType0, +) +from ..models.get_flow_by_path_response_200_value_failure_module_sleep_type_1 import ( + GetFlowByPathResponse200ValueFailureModuleSleepType1, +) +from ..models.get_flow_by_path_response_200_value_failure_module_stop_after_if import ( + GetFlowByPathResponse200ValueFailureModuleStopAfterIf, +) +from ..models.get_flow_by_path_response_200_value_failure_module_value_type_0 import ( + GetFlowByPathResponse200ValueFailureModuleValueType0, +) +from ..models.get_flow_by_path_response_200_value_failure_module_value_type_1 import ( + GetFlowByPathResponse200ValueFailureModuleValueType1, +) +from ..models.get_flow_by_path_response_200_value_failure_module_value_type_2 import ( + GetFlowByPathResponse200ValueFailureModuleValueType2, +) +from ..models.get_flow_by_path_response_200_value_failure_module_value_type_3 import ( + GetFlowByPathResponse200ValueFailureModuleValueType3, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueFailureModule") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueFailureModule: + """ + Attributes: + input_transforms (GetFlowByPathResponse200ValueFailureModuleInputTransforms): + value (Union[GetFlowByPathResponse200ValueFailureModuleValueType0, + GetFlowByPathResponse200ValueFailureModuleValueType1, GetFlowByPathResponse200ValueFailureModuleValueType2, + GetFlowByPathResponse200ValueFailureModuleValueType3]): + stop_after_if (Union[Unset, GetFlowByPathResponse200ValueFailureModuleStopAfterIf]): + sleep (Union[GetFlowByPathResponse200ValueFailureModuleSleepType0, + GetFlowByPathResponse200ValueFailureModuleSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, GetFlowByPathResponse200ValueFailureModuleRetry]): + """ + + input_transforms: GetFlowByPathResponse200ValueFailureModuleInputTransforms + value: Union[ + GetFlowByPathResponse200ValueFailureModuleValueType0, + GetFlowByPathResponse200ValueFailureModuleValueType1, + GetFlowByPathResponse200ValueFailureModuleValueType2, + GetFlowByPathResponse200ValueFailureModuleValueType3, + ] + stop_after_if: Union[Unset, GetFlowByPathResponse200ValueFailureModuleStopAfterIf] = UNSET + sleep: Union[ + GetFlowByPathResponse200ValueFailureModuleSleepType0, + GetFlowByPathResponse200ValueFailureModuleSleepType1, + Unset, + ] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, GetFlowByPathResponse200ValueFailureModuleRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, GetFlowByPathResponse200ValueFailureModuleValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, GetFlowByPathResponse200ValueFailureModuleValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, GetFlowByPathResponse200ValueFailureModuleValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, GetFlowByPathResponse200ValueFailureModuleSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = GetFlowByPathResponse200ValueFailureModuleInputTransforms.from_dict( + d.pop("input_transforms") + ) + + def _parse_value( + data: object, + ) -> Union[ + GetFlowByPathResponse200ValueFailureModuleValueType0, + GetFlowByPathResponse200ValueFailureModuleValueType1, + GetFlowByPathResponse200ValueFailureModuleValueType2, + GetFlowByPathResponse200ValueFailureModuleValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = GetFlowByPathResponse200ValueFailureModuleValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = GetFlowByPathResponse200ValueFailureModuleValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = GetFlowByPathResponse200ValueFailureModuleValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = GetFlowByPathResponse200ValueFailureModuleValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, GetFlowByPathResponse200ValueFailureModuleStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = GetFlowByPathResponse200ValueFailureModuleStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[ + GetFlowByPathResponse200ValueFailureModuleSleepType0, + GetFlowByPathResponse200ValueFailureModuleSleepType1, + Unset, + ]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, GetFlowByPathResponse200ValueFailureModuleSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = GetFlowByPathResponse200ValueFailureModuleSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, GetFlowByPathResponse200ValueFailureModuleSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = GetFlowByPathResponse200ValueFailureModuleSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, GetFlowByPathResponse200ValueFailureModuleRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = GetFlowByPathResponse200ValueFailureModuleRetry.from_dict(_retry) + + get_flow_by_path_response_200_value_failure_module = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + get_flow_by_path_response_200_value_failure_module.additional_properties = d + return get_flow_by_path_response_200_value_failure_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_input_transforms.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_input_transforms.py new file mode 100644 index 0000000000..9ea1d62350 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_input_transforms.py @@ -0,0 +1,109 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_0 import ( + GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType0, +) +from ..models.get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_1 import ( + GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueFailureModuleInputTransforms") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueFailureModuleInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType0, + GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + get_flow_by_path_response_200_value_failure_module_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType0, + GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType0.from_dict(data) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType1.from_dict(data) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + get_flow_by_path_response_200_value_failure_module_input_transforms.additional_properties = ( + additional_properties + ) + return get_flow_by_path_response_200_value_failure_module_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType0, + GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType0, + GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..d9593b2619 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_0.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_0_type import ( + GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_0.additional_properties = ( + d + ) + return get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..74ca63e334 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..48e66ba43c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_1.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_1_type import ( + GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_1.additional_properties = ( + d + ) + return get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..2ada87fea9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetFlowByPathResponse200ValueFailureModuleInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_retry.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_retry.py new file mode 100644 index 0000000000..55d6262903 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_retry.py @@ -0,0 +1,86 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_flow_by_path_response_200_value_failure_module_retry_constant import ( + GetFlowByPathResponse200ValueFailureModuleRetryConstant, +) +from ..models.get_flow_by_path_response_200_value_failure_module_retry_exponential import ( + GetFlowByPathResponse200ValueFailureModuleRetryExponential, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueFailureModuleRetry") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueFailureModuleRetry: + """ + Attributes: + constant (Union[Unset, GetFlowByPathResponse200ValueFailureModuleRetryConstant]): + exponential (Union[Unset, GetFlowByPathResponse200ValueFailureModuleRetryExponential]): + """ + + constant: Union[Unset, GetFlowByPathResponse200ValueFailureModuleRetryConstant] = UNSET + exponential: Union[Unset, GetFlowByPathResponse200ValueFailureModuleRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, GetFlowByPathResponse200ValueFailureModuleRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = GetFlowByPathResponse200ValueFailureModuleRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, GetFlowByPathResponse200ValueFailureModuleRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = GetFlowByPathResponse200ValueFailureModuleRetryExponential.from_dict(_exponential) + + get_flow_by_path_response_200_value_failure_module_retry = cls( + constant=constant, + exponential=exponential, + ) + + get_flow_by_path_response_200_value_failure_module_retry.additional_properties = d + return get_flow_by_path_response_200_value_failure_module_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_retry_constant.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_retry_constant.py new file mode 100644 index 0000000000..97c731f2d3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueFailureModuleRetryConstant") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueFailureModuleRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + get_flow_by_path_response_200_value_failure_module_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + get_flow_by_path_response_200_value_failure_module_retry_constant.additional_properties = d + return get_flow_by_path_response_200_value_failure_module_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_retry_exponential.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_retry_exponential.py new file mode 100644 index 0000000000..1b89567143 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueFailureModuleRetryExponential") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueFailureModuleRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + get_flow_by_path_response_200_value_failure_module_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + get_flow_by_path_response_200_value_failure_module_retry_exponential.additional_properties = d + return get_flow_by_path_response_200_value_failure_module_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_sleep_type_0.py new file mode 100644 index 0000000000..7e9e19689a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_sleep_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_flow_by_path_response_200_value_failure_module_sleep_type_0_type import ( + GetFlowByPathResponse200ValueFailureModuleSleepType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueFailureModuleSleepType0") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueFailureModuleSleepType0: + """ + Attributes: + type (GetFlowByPathResponse200ValueFailureModuleSleepType0Type): + value (Union[Unset, Any]): + """ + + type: GetFlowByPathResponse200ValueFailureModuleSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetFlowByPathResponse200ValueFailureModuleSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + get_flow_by_path_response_200_value_failure_module_sleep_type_0 = cls( + type=type, + value=value, + ) + + get_flow_by_path_response_200_value_failure_module_sleep_type_0.additional_properties = d + return get_flow_by_path_response_200_value_failure_module_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_sleep_type_0_type.py new file mode 100644 index 0000000000..ee907ca988 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetFlowByPathResponse200ValueFailureModuleSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_sleep_type_1.py new file mode 100644 index 0000000000..442e5320a1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_sleep_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_flow_by_path_response_200_value_failure_module_sleep_type_1_type import ( + GetFlowByPathResponse200ValueFailureModuleSleepType1Type, +) + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueFailureModuleSleepType1") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueFailureModuleSleepType1: + """ + Attributes: + expr (str): + type (GetFlowByPathResponse200ValueFailureModuleSleepType1Type): + """ + + expr: str + type: GetFlowByPathResponse200ValueFailureModuleSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = GetFlowByPathResponse200ValueFailureModuleSleepType1Type(d.pop("type")) + + get_flow_by_path_response_200_value_failure_module_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + get_flow_by_path_response_200_value_failure_module_sleep_type_1.additional_properties = d + return get_flow_by_path_response_200_value_failure_module_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_sleep_type_1_type.py new file mode 100644 index 0000000000..749c4efb77 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetFlowByPathResponse200ValueFailureModuleSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_stop_after_if.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_stop_after_if.py new file mode 100644 index 0000000000..310c1e55fe --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueFailureModuleStopAfterIf") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueFailureModuleStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + get_flow_by_path_response_200_value_failure_module_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + get_flow_by_path_response_200_value_failure_module_stop_after_if.additional_properties = d + return get_flow_by_path_response_200_value_failure_module_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_0.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_0.py new file mode 100644 index 0000000000..860fc211f1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_flow_by_path_response_200_value_failure_module_value_type_0_language import ( + GetFlowByPathResponse200ValueFailureModuleValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueFailureModuleValueType0") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueFailureModuleValueType0: + """ + Attributes: + content (str): + language (GetFlowByPathResponse200ValueFailureModuleValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: GetFlowByPathResponse200ValueFailureModuleValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = GetFlowByPathResponse200ValueFailureModuleValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + get_flow_by_path_response_200_value_failure_module_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + get_flow_by_path_response_200_value_failure_module_value_type_0.additional_properties = d + return get_flow_by_path_response_200_value_failure_module_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_0_language.py new file mode 100644 index 0000000000..94a8af0200 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class GetFlowByPathResponse200ValueFailureModuleValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_1.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_1.py new file mode 100644 index 0000000000..216cda5d01 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_flow_by_path_response_200_value_failure_module_value_type_1_type import ( + GetFlowByPathResponse200ValueFailureModuleValueType1Type, +) + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueFailureModuleValueType1") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueFailureModuleValueType1: + """ + Attributes: + path (str): + type (GetFlowByPathResponse200ValueFailureModuleValueType1Type): + """ + + path: str + type: GetFlowByPathResponse200ValueFailureModuleValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = GetFlowByPathResponse200ValueFailureModuleValueType1Type(d.pop("type")) + + get_flow_by_path_response_200_value_failure_module_value_type_1 = cls( + path=path, + type=type, + ) + + get_flow_by_path_response_200_value_failure_module_value_type_1.additional_properties = d + return get_flow_by_path_response_200_value_failure_module_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_1_type.py new file mode 100644 index 0000000000..524a6b89fd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetFlowByPathResponse200ValueFailureModuleValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2.py new file mode 100644 index 0000000000..59f133a9ad --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2.py @@ -0,0 +1,112 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_0 import ( + GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType0, +) +from ..models.get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_1 import ( + GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType1, +) +from ..models.get_flow_by_path_response_200_value_failure_module_value_type_2_type import ( + GetFlowByPathResponse200ValueFailureModuleValueType2Type, +) + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueFailureModuleValueType2") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueFailureModuleValueType2: + """ + Attributes: + iterator (Union[GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType0, + GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType1]): + skip_failures (bool): + type (GetFlowByPathResponse200ValueFailureModuleValueType2Type): + """ + + iterator: Union[ + GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType0, + GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType1, + ] + skip_failures: bool + type: GetFlowByPathResponse200ValueFailureModuleValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType0, + GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = GetFlowByPathResponse200ValueFailureModuleValueType2Type(d.pop("type")) + + get_flow_by_path_response_200_value_failure_module_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + get_flow_by_path_response_200_value_failure_module_value_type_2.additional_properties = d + return get_flow_by_path_response_200_value_failure_module_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..a97a7e85ec --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_0_type import ( + GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType0: + """ + Attributes: + type (GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_0.additional_properties = d + return get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..708381e98d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..29a132b511 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_1_type import ( + GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType1: + """ + Attributes: + expr (str): + type (GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType1Type): + """ + + expr: str + type: GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType1Type(d.pop("type")) + + get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_1.additional_properties = d + return get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..1025f9a96c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetFlowByPathResponse200ValueFailureModuleValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2_type.py new file mode 100644 index 0000000000..dece6ea552 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetFlowByPathResponse200ValueFailureModuleValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_3.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_3.py new file mode 100644 index 0000000000..550520aa40 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_3.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_flow_by_path_response_200_value_failure_module_value_type_3_type import ( + GetFlowByPathResponse200ValueFailureModuleValueType3Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueFailureModuleValueType3") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueFailureModuleValueType3: + """ + Attributes: + type (GetFlowByPathResponse200ValueFailureModuleValueType3Type): + path (Union[Unset, str]): + """ + + type: GetFlowByPathResponse200ValueFailureModuleValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetFlowByPathResponse200ValueFailureModuleValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + get_flow_by_path_response_200_value_failure_module_value_type_3 = cls( + type=type, + path=path, + ) + + get_flow_by_path_response_200_value_failure_module_value_type_3.additional_properties = d + return get_flow_by_path_response_200_value_failure_module_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_3_type.py new file mode 100644 index 0000000000..8b2fdf6340 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_failure_module_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetFlowByPathResponse200ValueFailureModuleValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item.py new file mode 100644 index 0000000000..9fcae4c5de --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item.py @@ -0,0 +1,254 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_flow_by_path_response_200_value_modules_item_input_transforms import ( + GetFlowByPathResponse200ValueModulesItemInputTransforms, +) +from ..models.get_flow_by_path_response_200_value_modules_item_retry import ( + GetFlowByPathResponse200ValueModulesItemRetry, +) +from ..models.get_flow_by_path_response_200_value_modules_item_sleep_type_0 import ( + GetFlowByPathResponse200ValueModulesItemSleepType0, +) +from ..models.get_flow_by_path_response_200_value_modules_item_sleep_type_1 import ( + GetFlowByPathResponse200ValueModulesItemSleepType1, +) +from ..models.get_flow_by_path_response_200_value_modules_item_stop_after_if import ( + GetFlowByPathResponse200ValueModulesItemStopAfterIf, +) +from ..models.get_flow_by_path_response_200_value_modules_item_value_type_0 import ( + GetFlowByPathResponse200ValueModulesItemValueType0, +) +from ..models.get_flow_by_path_response_200_value_modules_item_value_type_1 import ( + GetFlowByPathResponse200ValueModulesItemValueType1, +) +from ..models.get_flow_by_path_response_200_value_modules_item_value_type_2 import ( + GetFlowByPathResponse200ValueModulesItemValueType2, +) +from ..models.get_flow_by_path_response_200_value_modules_item_value_type_3 import ( + GetFlowByPathResponse200ValueModulesItemValueType3, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueModulesItem") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueModulesItem: + """ + Attributes: + input_transforms (GetFlowByPathResponse200ValueModulesItemInputTransforms): + value (Union[GetFlowByPathResponse200ValueModulesItemValueType0, + GetFlowByPathResponse200ValueModulesItemValueType1, GetFlowByPathResponse200ValueModulesItemValueType2, + GetFlowByPathResponse200ValueModulesItemValueType3]): + stop_after_if (Union[Unset, GetFlowByPathResponse200ValueModulesItemStopAfterIf]): + sleep (Union[GetFlowByPathResponse200ValueModulesItemSleepType0, + GetFlowByPathResponse200ValueModulesItemSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, GetFlowByPathResponse200ValueModulesItemRetry]): + """ + + input_transforms: GetFlowByPathResponse200ValueModulesItemInputTransforms + value: Union[ + GetFlowByPathResponse200ValueModulesItemValueType0, + GetFlowByPathResponse200ValueModulesItemValueType1, + GetFlowByPathResponse200ValueModulesItemValueType2, + GetFlowByPathResponse200ValueModulesItemValueType3, + ] + stop_after_if: Union[Unset, GetFlowByPathResponse200ValueModulesItemStopAfterIf] = UNSET + sleep: Union[ + GetFlowByPathResponse200ValueModulesItemSleepType0, GetFlowByPathResponse200ValueModulesItemSleepType1, Unset + ] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, GetFlowByPathResponse200ValueModulesItemRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, GetFlowByPathResponse200ValueModulesItemValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, GetFlowByPathResponse200ValueModulesItemValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, GetFlowByPathResponse200ValueModulesItemValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, GetFlowByPathResponse200ValueModulesItemSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = GetFlowByPathResponse200ValueModulesItemInputTransforms.from_dict(d.pop("input_transforms")) + + def _parse_value( + data: object, + ) -> Union[ + GetFlowByPathResponse200ValueModulesItemValueType0, + GetFlowByPathResponse200ValueModulesItemValueType1, + GetFlowByPathResponse200ValueModulesItemValueType2, + GetFlowByPathResponse200ValueModulesItemValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = GetFlowByPathResponse200ValueModulesItemValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = GetFlowByPathResponse200ValueModulesItemValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = GetFlowByPathResponse200ValueModulesItemValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = GetFlowByPathResponse200ValueModulesItemValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, GetFlowByPathResponse200ValueModulesItemStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = GetFlowByPathResponse200ValueModulesItemStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[ + GetFlowByPathResponse200ValueModulesItemSleepType0, + GetFlowByPathResponse200ValueModulesItemSleepType1, + Unset, + ]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, GetFlowByPathResponse200ValueModulesItemSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = GetFlowByPathResponse200ValueModulesItemSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, GetFlowByPathResponse200ValueModulesItemSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = GetFlowByPathResponse200ValueModulesItemSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, GetFlowByPathResponse200ValueModulesItemRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = GetFlowByPathResponse200ValueModulesItemRetry.from_dict(_retry) + + get_flow_by_path_response_200_value_modules_item = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + get_flow_by_path_response_200_value_modules_item.additional_properties = d + return get_flow_by_path_response_200_value_modules_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_input_transforms.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_input_transforms.py new file mode 100644 index 0000000000..2bf0d4881f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_input_transforms.py @@ -0,0 +1,107 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_0 import ( + GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType0, +) +from ..models.get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_1 import ( + GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueModulesItemInputTransforms") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueModulesItemInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType0, + GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + get_flow_by_path_response_200_value_modules_item_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType0, + GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType0.from_dict(data) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType1.from_dict(data) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + get_flow_by_path_response_200_value_modules_item_input_transforms.additional_properties = additional_properties + return get_flow_by_path_response_200_value_modules_item_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType0, + GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType0, + GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..f80b04777e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_0.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_0_type import ( + GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_0.additional_properties = ( + d + ) + return get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..dce24eec8d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..cb6523bdb9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_1.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_1_type import ( + GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_1.additional_properties = ( + d + ) + return get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..df211da5e6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetFlowByPathResponse200ValueModulesItemInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_retry.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_retry.py new file mode 100644 index 0000000000..72ebebc8e6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_retry.py @@ -0,0 +1,86 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_flow_by_path_response_200_value_modules_item_retry_constant import ( + GetFlowByPathResponse200ValueModulesItemRetryConstant, +) +from ..models.get_flow_by_path_response_200_value_modules_item_retry_exponential import ( + GetFlowByPathResponse200ValueModulesItemRetryExponential, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueModulesItemRetry") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueModulesItemRetry: + """ + Attributes: + constant (Union[Unset, GetFlowByPathResponse200ValueModulesItemRetryConstant]): + exponential (Union[Unset, GetFlowByPathResponse200ValueModulesItemRetryExponential]): + """ + + constant: Union[Unset, GetFlowByPathResponse200ValueModulesItemRetryConstant] = UNSET + exponential: Union[Unset, GetFlowByPathResponse200ValueModulesItemRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, GetFlowByPathResponse200ValueModulesItemRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = GetFlowByPathResponse200ValueModulesItemRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, GetFlowByPathResponse200ValueModulesItemRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = GetFlowByPathResponse200ValueModulesItemRetryExponential.from_dict(_exponential) + + get_flow_by_path_response_200_value_modules_item_retry = cls( + constant=constant, + exponential=exponential, + ) + + get_flow_by_path_response_200_value_modules_item_retry.additional_properties = d + return get_flow_by_path_response_200_value_modules_item_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_retry_constant.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_retry_constant.py new file mode 100644 index 0000000000..c326008589 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueModulesItemRetryConstant") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueModulesItemRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + get_flow_by_path_response_200_value_modules_item_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + get_flow_by_path_response_200_value_modules_item_retry_constant.additional_properties = d + return get_flow_by_path_response_200_value_modules_item_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_retry_exponential.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_retry_exponential.py new file mode 100644 index 0000000000..36da51d163 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueModulesItemRetryExponential") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueModulesItemRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + get_flow_by_path_response_200_value_modules_item_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + get_flow_by_path_response_200_value_modules_item_retry_exponential.additional_properties = d + return get_flow_by_path_response_200_value_modules_item_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_sleep_type_0.py new file mode 100644 index 0000000000..28ace52709 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_sleep_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_flow_by_path_response_200_value_modules_item_sleep_type_0_type import ( + GetFlowByPathResponse200ValueModulesItemSleepType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueModulesItemSleepType0") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueModulesItemSleepType0: + """ + Attributes: + type (GetFlowByPathResponse200ValueModulesItemSleepType0Type): + value (Union[Unset, Any]): + """ + + type: GetFlowByPathResponse200ValueModulesItemSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetFlowByPathResponse200ValueModulesItemSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + get_flow_by_path_response_200_value_modules_item_sleep_type_0 = cls( + type=type, + value=value, + ) + + get_flow_by_path_response_200_value_modules_item_sleep_type_0.additional_properties = d + return get_flow_by_path_response_200_value_modules_item_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_sleep_type_0_type.py new file mode 100644 index 0000000000..39bfedef43 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetFlowByPathResponse200ValueModulesItemSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_sleep_type_1.py new file mode 100644 index 0000000000..a63ea722ca --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_sleep_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_flow_by_path_response_200_value_modules_item_sleep_type_1_type import ( + GetFlowByPathResponse200ValueModulesItemSleepType1Type, +) + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueModulesItemSleepType1") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueModulesItemSleepType1: + """ + Attributes: + expr (str): + type (GetFlowByPathResponse200ValueModulesItemSleepType1Type): + """ + + expr: str + type: GetFlowByPathResponse200ValueModulesItemSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = GetFlowByPathResponse200ValueModulesItemSleepType1Type(d.pop("type")) + + get_flow_by_path_response_200_value_modules_item_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + get_flow_by_path_response_200_value_modules_item_sleep_type_1.additional_properties = d + return get_flow_by_path_response_200_value_modules_item_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_sleep_type_1_type.py new file mode 100644 index 0000000000..46a4c7cbdd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetFlowByPathResponse200ValueModulesItemSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_stop_after_if.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_stop_after_if.py new file mode 100644 index 0000000000..a8079ce1d3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueModulesItemStopAfterIf") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueModulesItemStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + get_flow_by_path_response_200_value_modules_item_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + get_flow_by_path_response_200_value_modules_item_stop_after_if.additional_properties = d + return get_flow_by_path_response_200_value_modules_item_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_0.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_0.py new file mode 100644 index 0000000000..7ae733dff8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_flow_by_path_response_200_value_modules_item_value_type_0_language import ( + GetFlowByPathResponse200ValueModulesItemValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueModulesItemValueType0") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueModulesItemValueType0: + """ + Attributes: + content (str): + language (GetFlowByPathResponse200ValueModulesItemValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: GetFlowByPathResponse200ValueModulesItemValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = GetFlowByPathResponse200ValueModulesItemValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + get_flow_by_path_response_200_value_modules_item_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + get_flow_by_path_response_200_value_modules_item_value_type_0.additional_properties = d + return get_flow_by_path_response_200_value_modules_item_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_0_language.py new file mode 100644 index 0000000000..0a1c6ecc36 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class GetFlowByPathResponse200ValueModulesItemValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_1.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_1.py new file mode 100644 index 0000000000..ab1f382d24 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_flow_by_path_response_200_value_modules_item_value_type_1_type import ( + GetFlowByPathResponse200ValueModulesItemValueType1Type, +) + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueModulesItemValueType1") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueModulesItemValueType1: + """ + Attributes: + path (str): + type (GetFlowByPathResponse200ValueModulesItemValueType1Type): + """ + + path: str + type: GetFlowByPathResponse200ValueModulesItemValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = GetFlowByPathResponse200ValueModulesItemValueType1Type(d.pop("type")) + + get_flow_by_path_response_200_value_modules_item_value_type_1 = cls( + path=path, + type=type, + ) + + get_flow_by_path_response_200_value_modules_item_value_type_1.additional_properties = d + return get_flow_by_path_response_200_value_modules_item_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_1_type.py new file mode 100644 index 0000000000..2bbddd1999 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetFlowByPathResponse200ValueModulesItemValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2.py new file mode 100644 index 0000000000..354e1494ad --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2.py @@ -0,0 +1,112 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_0 import ( + GetFlowByPathResponse200ValueModulesItemValueType2IteratorType0, +) +from ..models.get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_1 import ( + GetFlowByPathResponse200ValueModulesItemValueType2IteratorType1, +) +from ..models.get_flow_by_path_response_200_value_modules_item_value_type_2_type import ( + GetFlowByPathResponse200ValueModulesItemValueType2Type, +) + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueModulesItemValueType2") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueModulesItemValueType2: + """ + Attributes: + iterator (Union[GetFlowByPathResponse200ValueModulesItemValueType2IteratorType0, + GetFlowByPathResponse200ValueModulesItemValueType2IteratorType1]): + skip_failures (bool): + type (GetFlowByPathResponse200ValueModulesItemValueType2Type): + """ + + iterator: Union[ + GetFlowByPathResponse200ValueModulesItemValueType2IteratorType0, + GetFlowByPathResponse200ValueModulesItemValueType2IteratorType1, + ] + skip_failures: bool + type: GetFlowByPathResponse200ValueModulesItemValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, GetFlowByPathResponse200ValueModulesItemValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + GetFlowByPathResponse200ValueModulesItemValueType2IteratorType0, + GetFlowByPathResponse200ValueModulesItemValueType2IteratorType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = GetFlowByPathResponse200ValueModulesItemValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = GetFlowByPathResponse200ValueModulesItemValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = GetFlowByPathResponse200ValueModulesItemValueType2Type(d.pop("type")) + + get_flow_by_path_response_200_value_modules_item_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + get_flow_by_path_response_200_value_modules_item_value_type_2.additional_properties = d + return get_flow_by_path_response_200_value_modules_item_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..dd3218e6de --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_0_type import ( + GetFlowByPathResponse200ValueModulesItemValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueModulesItemValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueModulesItemValueType2IteratorType0: + """ + Attributes: + type (GetFlowByPathResponse200ValueModulesItemValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: GetFlowByPathResponse200ValueModulesItemValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetFlowByPathResponse200ValueModulesItemValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_0.additional_properties = d + return get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..f04c993865 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetFlowByPathResponse200ValueModulesItemValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..90116abf6f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_1_type import ( + GetFlowByPathResponse200ValueModulesItemValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueModulesItemValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueModulesItemValueType2IteratorType1: + """ + Attributes: + expr (str): + type (GetFlowByPathResponse200ValueModulesItemValueType2IteratorType1Type): + """ + + expr: str + type: GetFlowByPathResponse200ValueModulesItemValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = GetFlowByPathResponse200ValueModulesItemValueType2IteratorType1Type(d.pop("type")) + + get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_1.additional_properties = d + return get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..bd50ea23cd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetFlowByPathResponse200ValueModulesItemValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2_type.py new file mode 100644 index 0000000000..1edcfe8d67 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetFlowByPathResponse200ValueModulesItemValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_3.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_3.py new file mode 100644 index 0000000000..f291351605 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_3.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_flow_by_path_response_200_value_modules_item_value_type_3_type import ( + GetFlowByPathResponse200ValueModulesItemValueType3Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetFlowByPathResponse200ValueModulesItemValueType3") + + +@attr.s(auto_attribs=True) +class GetFlowByPathResponse200ValueModulesItemValueType3: + """ + Attributes: + type (GetFlowByPathResponse200ValueModulesItemValueType3Type): + path (Union[Unset, str]): + """ + + type: GetFlowByPathResponse200ValueModulesItemValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetFlowByPathResponse200ValueModulesItemValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + get_flow_by_path_response_200_value_modules_item_value_type_3 = cls( + type=type, + path=path, + ) + + get_flow_by_path_response_200_value_modules_item_value_type_3.additional_properties = d + return get_flow_by_path_response_200_value_modules_item_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_3_type.py new file mode 100644 index 0000000000..a29d4c8d2b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_flow_by_path_response_200_value_modules_item_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetFlowByPathResponse200ValueModulesItemValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_granular_acls_kind.py b/python-client/windmill-api/windmill_api/models/get_granular_acls_kind.py new file mode 100644 index 0000000000..2e32e6ffd5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_granular_acls_kind.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class GetGranularAclsKind(str, Enum): + SCRIPT = "script" + GROUP = "group_" + RESOURCE = "resource" + SCHEDULE = "schedule" + VARIABLE = "variable" + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_granular_acls_response_200.py b/python-client/windmill-api/windmill_api/models/get_granular_acls_response_200.py new file mode 100644 index 0000000000..4baf21bcee --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_granular_acls_response_200.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="GetGranularAclsResponse200") + + +@attr.s(auto_attribs=True) +class GetGranularAclsResponse200: + """ """ + + additional_properties: Dict[str, bool] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + get_granular_acls_response_200 = cls() + + get_granular_acls_response_200.additional_properties = d + return get_granular_acls_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> bool: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: bool) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_group_response_200.py b/python-client/windmill-api/windmill_api/models/get_group_response_200.py new file mode 100644 index 0000000000..b6082c5b75 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_group_response_200.py @@ -0,0 +1,94 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.get_group_response_200_extra_perms import GetGroupResponse200ExtraPerms +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetGroupResponse200") + + +@attr.s(auto_attribs=True) +class GetGroupResponse200: + """ + Attributes: + name (str): + summary (Union[Unset, str]): + members (Union[Unset, List[str]]): + extra_perms (Union[Unset, GetGroupResponse200ExtraPerms]): + """ + + name: str + summary: Union[Unset, str] = UNSET + members: Union[Unset, List[str]] = UNSET + extra_perms: Union[Unset, GetGroupResponse200ExtraPerms] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + summary = self.summary + members: Union[Unset, List[str]] = UNSET + if not isinstance(self.members, Unset): + members = self.members + + extra_perms: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.extra_perms, Unset): + extra_perms = self.extra_perms.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if summary is not UNSET: + field_dict["summary"] = summary + if members is not UNSET: + field_dict["members"] = members + if extra_perms is not UNSET: + field_dict["extra_perms"] = extra_perms + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name") + + summary = d.pop("summary", UNSET) + + members = cast(List[str], d.pop("members", UNSET)) + + _extra_perms = d.pop("extra_perms", UNSET) + extra_perms: Union[Unset, GetGroupResponse200ExtraPerms] + if isinstance(_extra_perms, Unset): + extra_perms = UNSET + else: + extra_perms = GetGroupResponse200ExtraPerms.from_dict(_extra_perms) + + get_group_response_200 = cls( + name=name, + summary=summary, + members=members, + extra_perms=extra_perms, + ) + + get_group_response_200.additional_properties = d + return get_group_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_group_response_200_extra_perms.py b/python-client/windmill-api/windmill_api/models/get_group_response_200_extra_perms.py new file mode 100644 index 0000000000..74ff69649d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_group_response_200_extra_perms.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="GetGroupResponse200ExtraPerms") + + +@attr.s(auto_attribs=True) +class GetGroupResponse200ExtraPerms: + """ """ + + additional_properties: Dict[str, bool] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + get_group_response_200_extra_perms = cls() + + get_group_response_200_extra_perms.additional_properties = d + return get_group_response_200_extra_perms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> bool: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: bool) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200.py new file mode 100644 index 0000000000..d7814133fc --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow import GetHubFlowByIdResponse200Flow +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetHubFlowByIdResponse200") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200: + """ + Attributes: + flow (Union[Unset, GetHubFlowByIdResponse200Flow]): + """ + + flow: Union[Unset, GetHubFlowByIdResponse200Flow] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + flow: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.flow, Unset): + flow = self.flow.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if flow is not UNSET: + field_dict["flow"] = flow + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _flow = d.pop("flow", UNSET) + flow: Union[Unset, GetHubFlowByIdResponse200Flow] + if isinstance(_flow, Unset): + flow = UNSET + else: + flow = GetHubFlowByIdResponse200Flow.from_dict(_flow) + + get_hub_flow_by_id_response_200 = cls( + flow=flow, + ) + + get_hub_flow_by_id_response_200.additional_properties = d + return get_hub_flow_by_id_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow.py new file mode 100644 index 0000000000..5ce7681c1d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow.py @@ -0,0 +1,92 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_schema import GetHubFlowByIdResponse200FlowSchema +from ..models.get_hub_flow_by_id_response_200_flow_value import GetHubFlowByIdResponse200FlowValue +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetHubFlowByIdResponse200Flow") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200Flow: + """ + Attributes: + summary (str): + value (GetHubFlowByIdResponse200FlowValue): + description (Union[Unset, str]): + schema (Union[Unset, GetHubFlowByIdResponse200FlowSchema]): + """ + + summary: str + value: GetHubFlowByIdResponse200FlowValue + description: Union[Unset, str] = UNSET + schema: Union[Unset, GetHubFlowByIdResponse200FlowSchema] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + summary = self.summary + value = self.value.to_dict() + + description = self.description + schema: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.schema, Unset): + schema = self.schema.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "summary": summary, + "value": value, + } + ) + if description is not UNSET: + field_dict["description"] = description + if schema is not UNSET: + field_dict["schema"] = schema + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + summary = d.pop("summary") + + value = GetHubFlowByIdResponse200FlowValue.from_dict(d.pop("value")) + + description = d.pop("description", UNSET) + + _schema = d.pop("schema", UNSET) + schema: Union[Unset, GetHubFlowByIdResponse200FlowSchema] + if isinstance(_schema, Unset): + schema = UNSET + else: + schema = GetHubFlowByIdResponse200FlowSchema.from_dict(_schema) + + get_hub_flow_by_id_response_200_flow = cls( + summary=summary, + value=value, + description=description, + schema=schema, + ) + + get_hub_flow_by_id_response_200_flow.additional_properties = d + return get_hub_flow_by_id_response_200_flow + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_schema.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_schema.py new file mode 100644 index 0000000000..5e571201d0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_schema.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowSchema") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowSchema: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + get_hub_flow_by_id_response_200_flow_schema = cls() + + get_hub_flow_by_id_response_200_flow_schema.additional_properties = d + return get_hub_flow_by_id_response_200_flow_schema + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value.py new file mode 100644 index 0000000000..db9575e9f0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value.py @@ -0,0 +1,99 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module import ( + GetHubFlowByIdResponse200FlowValueFailureModule, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item import ( + GetHubFlowByIdResponse200FlowValueModulesItem, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValue") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValue: + """ + Attributes: + modules (List[GetHubFlowByIdResponse200FlowValueModulesItem]): + failure_module (Union[Unset, GetHubFlowByIdResponse200FlowValueFailureModule]): + same_worker (Union[Unset, bool]): + """ + + modules: List[GetHubFlowByIdResponse200FlowValueModulesItem] + failure_module: Union[Unset, GetHubFlowByIdResponse200FlowValueFailureModule] = UNSET + same_worker: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + modules = [] + for modules_item_data in self.modules: + modules_item = modules_item_data.to_dict() + + modules.append(modules_item) + + failure_module: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.failure_module, Unset): + failure_module = self.failure_module.to_dict() + + same_worker = self.same_worker + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "modules": modules, + } + ) + if failure_module is not UNSET: + field_dict["failure_module"] = failure_module + if same_worker is not UNSET: + field_dict["same_worker"] = same_worker + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + modules = [] + _modules = d.pop("modules") + for modules_item_data in _modules: + modules_item = GetHubFlowByIdResponse200FlowValueModulesItem.from_dict(modules_item_data) + + modules.append(modules_item) + + _failure_module = d.pop("failure_module", UNSET) + failure_module: Union[Unset, GetHubFlowByIdResponse200FlowValueFailureModule] + if isinstance(_failure_module, Unset): + failure_module = UNSET + else: + failure_module = GetHubFlowByIdResponse200FlowValueFailureModule.from_dict(_failure_module) + + same_worker = d.pop("same_worker", UNSET) + + get_hub_flow_by_id_response_200_flow_value = cls( + modules=modules, + failure_module=failure_module, + same_worker=same_worker, + ) + + get_hub_flow_by_id_response_200_flow_value.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module.py new file mode 100644 index 0000000000..7449cee1ff --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module.py @@ -0,0 +1,259 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms import ( + GetHubFlowByIdResponse200FlowValueFailureModuleInputTransforms, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_retry import ( + GetHubFlowByIdResponse200FlowValueFailureModuleRetry, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_0 import ( + GetHubFlowByIdResponse200FlowValueFailureModuleSleepType0, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_1 import ( + GetHubFlowByIdResponse200FlowValueFailureModuleSleepType1, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_stop_after_if import ( + GetHubFlowByIdResponse200FlowValueFailureModuleStopAfterIf, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_0 import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType0, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_1 import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType1, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2 import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType2, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_3 import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType3, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueFailureModule") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueFailureModule: + """ + Attributes: + input_transforms (GetHubFlowByIdResponse200FlowValueFailureModuleInputTransforms): + value (Union[GetHubFlowByIdResponse200FlowValueFailureModuleValueType0, + GetHubFlowByIdResponse200FlowValueFailureModuleValueType1, + GetHubFlowByIdResponse200FlowValueFailureModuleValueType2, + GetHubFlowByIdResponse200FlowValueFailureModuleValueType3]): + stop_after_if (Union[Unset, GetHubFlowByIdResponse200FlowValueFailureModuleStopAfterIf]): + sleep (Union[GetHubFlowByIdResponse200FlowValueFailureModuleSleepType0, + GetHubFlowByIdResponse200FlowValueFailureModuleSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, GetHubFlowByIdResponse200FlowValueFailureModuleRetry]): + """ + + input_transforms: GetHubFlowByIdResponse200FlowValueFailureModuleInputTransforms + value: Union[ + GetHubFlowByIdResponse200FlowValueFailureModuleValueType0, + GetHubFlowByIdResponse200FlowValueFailureModuleValueType1, + GetHubFlowByIdResponse200FlowValueFailureModuleValueType2, + GetHubFlowByIdResponse200FlowValueFailureModuleValueType3, + ] + stop_after_if: Union[Unset, GetHubFlowByIdResponse200FlowValueFailureModuleStopAfterIf] = UNSET + sleep: Union[ + GetHubFlowByIdResponse200FlowValueFailureModuleSleepType0, + GetHubFlowByIdResponse200FlowValueFailureModuleSleepType1, + Unset, + ] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, GetHubFlowByIdResponse200FlowValueFailureModuleRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, GetHubFlowByIdResponse200FlowValueFailureModuleValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, GetHubFlowByIdResponse200FlowValueFailureModuleValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, GetHubFlowByIdResponse200FlowValueFailureModuleValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, GetHubFlowByIdResponse200FlowValueFailureModuleSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = GetHubFlowByIdResponse200FlowValueFailureModuleInputTransforms.from_dict( + d.pop("input_transforms") + ) + + def _parse_value( + data: object, + ) -> Union[ + GetHubFlowByIdResponse200FlowValueFailureModuleValueType0, + GetHubFlowByIdResponse200FlowValueFailureModuleValueType1, + GetHubFlowByIdResponse200FlowValueFailureModuleValueType2, + GetHubFlowByIdResponse200FlowValueFailureModuleValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = GetHubFlowByIdResponse200FlowValueFailureModuleValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = GetHubFlowByIdResponse200FlowValueFailureModuleValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = GetHubFlowByIdResponse200FlowValueFailureModuleValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = GetHubFlowByIdResponse200FlowValueFailureModuleValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, GetHubFlowByIdResponse200FlowValueFailureModuleStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = GetHubFlowByIdResponse200FlowValueFailureModuleStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[ + GetHubFlowByIdResponse200FlowValueFailureModuleSleepType0, + GetHubFlowByIdResponse200FlowValueFailureModuleSleepType1, + Unset, + ]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, GetHubFlowByIdResponse200FlowValueFailureModuleSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = GetHubFlowByIdResponse200FlowValueFailureModuleSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, GetHubFlowByIdResponse200FlowValueFailureModuleSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = GetHubFlowByIdResponse200FlowValueFailureModuleSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, GetHubFlowByIdResponse200FlowValueFailureModuleRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = GetHubFlowByIdResponse200FlowValueFailureModuleRetry.from_dict(_retry) + + get_hub_flow_by_id_response_200_flow_value_failure_module = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + get_hub_flow_by_id_response_200_flow_value_failure_module.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_failure_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms.py new file mode 100644 index 0000000000..09e7b61a82 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms.py @@ -0,0 +1,113 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_0 import ( + GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType0, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_1 import ( + GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueFailureModuleInputTransforms") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueFailureModuleInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType0, + GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType0, + GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType0.from_dict( + data + ) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType1.from_dict( + data + ) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms.additional_properties = ( + additional_properties + ) + return get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType0, + GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType0, + GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..49c133452b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_0.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_0_type import ( + GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_0.additional_properties = ( + d + ) + return get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..28dd237e32 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..117b5559a4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_1.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_1_type import ( + GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_1.additional_properties = ( + d + ) + return get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..6e58d11b65 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetHubFlowByIdResponse200FlowValueFailureModuleInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_retry.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_retry.py new file mode 100644 index 0000000000..b64cb1dae2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_retry.py @@ -0,0 +1,86 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_retry_constant import ( + GetHubFlowByIdResponse200FlowValueFailureModuleRetryConstant, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_retry_exponential import ( + GetHubFlowByIdResponse200FlowValueFailureModuleRetryExponential, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueFailureModuleRetry") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueFailureModuleRetry: + """ + Attributes: + constant (Union[Unset, GetHubFlowByIdResponse200FlowValueFailureModuleRetryConstant]): + exponential (Union[Unset, GetHubFlowByIdResponse200FlowValueFailureModuleRetryExponential]): + """ + + constant: Union[Unset, GetHubFlowByIdResponse200FlowValueFailureModuleRetryConstant] = UNSET + exponential: Union[Unset, GetHubFlowByIdResponse200FlowValueFailureModuleRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, GetHubFlowByIdResponse200FlowValueFailureModuleRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = GetHubFlowByIdResponse200FlowValueFailureModuleRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, GetHubFlowByIdResponse200FlowValueFailureModuleRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = GetHubFlowByIdResponse200FlowValueFailureModuleRetryExponential.from_dict(_exponential) + + get_hub_flow_by_id_response_200_flow_value_failure_module_retry = cls( + constant=constant, + exponential=exponential, + ) + + get_hub_flow_by_id_response_200_flow_value_failure_module_retry.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_failure_module_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_retry_constant.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_retry_constant.py new file mode 100644 index 0000000000..474ffe9b74 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueFailureModuleRetryConstant") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueFailureModuleRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + get_hub_flow_by_id_response_200_flow_value_failure_module_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + get_hub_flow_by_id_response_200_flow_value_failure_module_retry_constant.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_failure_module_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_retry_exponential.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_retry_exponential.py new file mode 100644 index 0000000000..fcc2b46621 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueFailureModuleRetryExponential") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueFailureModuleRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + get_hub_flow_by_id_response_200_flow_value_failure_module_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + get_hub_flow_by_id_response_200_flow_value_failure_module_retry_exponential.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_failure_module_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_0.py new file mode 100644 index 0000000000..5b1be384da --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_0_type import ( + GetHubFlowByIdResponse200FlowValueFailureModuleSleepType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueFailureModuleSleepType0") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueFailureModuleSleepType0: + """ + Attributes: + type (GetHubFlowByIdResponse200FlowValueFailureModuleSleepType0Type): + value (Union[Unset, Any]): + """ + + type: GetHubFlowByIdResponse200FlowValueFailureModuleSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetHubFlowByIdResponse200FlowValueFailureModuleSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_0 = cls( + type=type, + value=value, + ) + + get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_0.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_0_type.py new file mode 100644 index 0000000000..a35ed3dd5d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetHubFlowByIdResponse200FlowValueFailureModuleSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_1.py new file mode 100644 index 0000000000..bd3f255e55 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_1_type import ( + GetHubFlowByIdResponse200FlowValueFailureModuleSleepType1Type, +) + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueFailureModuleSleepType1") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueFailureModuleSleepType1: + """ + Attributes: + expr (str): + type (GetHubFlowByIdResponse200FlowValueFailureModuleSleepType1Type): + """ + + expr: str + type: GetHubFlowByIdResponse200FlowValueFailureModuleSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = GetHubFlowByIdResponse200FlowValueFailureModuleSleepType1Type(d.pop("type")) + + get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_1.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_1_type.py new file mode 100644 index 0000000000..b339dc6c7b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetHubFlowByIdResponse200FlowValueFailureModuleSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_stop_after_if.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_stop_after_if.py new file mode 100644 index 0000000000..cfaa1707b4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueFailureModuleStopAfterIf") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueFailureModuleStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + get_hub_flow_by_id_response_200_flow_value_failure_module_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + get_hub_flow_by_id_response_200_flow_value_failure_module_stop_after_if.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_failure_module_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_0.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_0.py new file mode 100644 index 0000000000..2a1869b259 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_0_language import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueFailureModuleValueType0") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueFailureModuleValueType0: + """ + Attributes: + content (str): + language (GetHubFlowByIdResponse200FlowValueFailureModuleValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: GetHubFlowByIdResponse200FlowValueFailureModuleValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = GetHubFlowByIdResponse200FlowValueFailureModuleValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_0.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_0_language.py new file mode 100644 index 0000000000..1e6be033d7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class GetHubFlowByIdResponse200FlowValueFailureModuleValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_1.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_1.py new file mode 100644 index 0000000000..2c9d5ff43d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_1_type import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType1Type, +) + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueFailureModuleValueType1") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueFailureModuleValueType1: + """ + Attributes: + path (str): + type (GetHubFlowByIdResponse200FlowValueFailureModuleValueType1Type): + """ + + path: str + type: GetHubFlowByIdResponse200FlowValueFailureModuleValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = GetHubFlowByIdResponse200FlowValueFailureModuleValueType1Type(d.pop("type")) + + get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_1 = cls( + path=path, + type=type, + ) + + get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_1.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_1_type.py new file mode 100644 index 0000000000..4121777cce --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetHubFlowByIdResponse200FlowValueFailureModuleValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2.py new file mode 100644 index 0000000000..d64cc822d3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2.py @@ -0,0 +1,112 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_0 import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType0, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_1 import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType1, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_type import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType2Type, +) + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueFailureModuleValueType2") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueFailureModuleValueType2: + """ + Attributes: + iterator (Union[GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType0, + GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType1]): + skip_failures (bool): + type (GetHubFlowByIdResponse200FlowValueFailureModuleValueType2Type): + """ + + iterator: Union[ + GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType0, + GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType1, + ] + skip_failures: bool + type: GetHubFlowByIdResponse200FlowValueFailureModuleValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType0, + GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = GetHubFlowByIdResponse200FlowValueFailureModuleValueType2Type(d.pop("type")) + + get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..1cfd9c5cfc --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_0_type import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType0: + """ + Attributes: + type (GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_0.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..6157e5bc4b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..30f5b7f48f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_1_type import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType1: + """ + Attributes: + expr (str): + type (GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType1Type): + """ + + expr: str + type: GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType1Type(d.pop("type")) + + get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_1.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..e986a0e472 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetHubFlowByIdResponse200FlowValueFailureModuleValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_type.py new file mode 100644 index 0000000000..bcdc07538c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetHubFlowByIdResponse200FlowValueFailureModuleValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_3.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_3.py new file mode 100644 index 0000000000..c8358a9e5a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_3.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_3_type import ( + GetHubFlowByIdResponse200FlowValueFailureModuleValueType3Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueFailureModuleValueType3") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueFailureModuleValueType3: + """ + Attributes: + type (GetHubFlowByIdResponse200FlowValueFailureModuleValueType3Type): + path (Union[Unset, str]): + """ + + type: GetHubFlowByIdResponse200FlowValueFailureModuleValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetHubFlowByIdResponse200FlowValueFailureModuleValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_3 = cls( + type=type, + path=path, + ) + + get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_3.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_3_type.py new file mode 100644 index 0000000000..c701d25c6c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_failure_module_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetHubFlowByIdResponse200FlowValueFailureModuleValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item.py new file mode 100644 index 0000000000..81f01fe1a0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item.py @@ -0,0 +1,259 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms import ( + GetHubFlowByIdResponse200FlowValueModulesItemInputTransforms, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_retry import ( + GetHubFlowByIdResponse200FlowValueModulesItemRetry, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_0 import ( + GetHubFlowByIdResponse200FlowValueModulesItemSleepType0, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_1 import ( + GetHubFlowByIdResponse200FlowValueModulesItemSleepType1, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_stop_after_if import ( + GetHubFlowByIdResponse200FlowValueModulesItemStopAfterIf, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_0 import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType0, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_1 import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType1, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2 import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType2, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_3 import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType3, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueModulesItem") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueModulesItem: + """ + Attributes: + input_transforms (GetHubFlowByIdResponse200FlowValueModulesItemInputTransforms): + value (Union[GetHubFlowByIdResponse200FlowValueModulesItemValueType0, + GetHubFlowByIdResponse200FlowValueModulesItemValueType1, + GetHubFlowByIdResponse200FlowValueModulesItemValueType2, + GetHubFlowByIdResponse200FlowValueModulesItemValueType3]): + stop_after_if (Union[Unset, GetHubFlowByIdResponse200FlowValueModulesItemStopAfterIf]): + sleep (Union[GetHubFlowByIdResponse200FlowValueModulesItemSleepType0, + GetHubFlowByIdResponse200FlowValueModulesItemSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, GetHubFlowByIdResponse200FlowValueModulesItemRetry]): + """ + + input_transforms: GetHubFlowByIdResponse200FlowValueModulesItemInputTransforms + value: Union[ + GetHubFlowByIdResponse200FlowValueModulesItemValueType0, + GetHubFlowByIdResponse200FlowValueModulesItemValueType1, + GetHubFlowByIdResponse200FlowValueModulesItemValueType2, + GetHubFlowByIdResponse200FlowValueModulesItemValueType3, + ] + stop_after_if: Union[Unset, GetHubFlowByIdResponse200FlowValueModulesItemStopAfterIf] = UNSET + sleep: Union[ + GetHubFlowByIdResponse200FlowValueModulesItemSleepType0, + GetHubFlowByIdResponse200FlowValueModulesItemSleepType1, + Unset, + ] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, GetHubFlowByIdResponse200FlowValueModulesItemRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, GetHubFlowByIdResponse200FlowValueModulesItemValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, GetHubFlowByIdResponse200FlowValueModulesItemValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, GetHubFlowByIdResponse200FlowValueModulesItemValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, GetHubFlowByIdResponse200FlowValueModulesItemSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = GetHubFlowByIdResponse200FlowValueModulesItemInputTransforms.from_dict( + d.pop("input_transforms") + ) + + def _parse_value( + data: object, + ) -> Union[ + GetHubFlowByIdResponse200FlowValueModulesItemValueType0, + GetHubFlowByIdResponse200FlowValueModulesItemValueType1, + GetHubFlowByIdResponse200FlowValueModulesItemValueType2, + GetHubFlowByIdResponse200FlowValueModulesItemValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = GetHubFlowByIdResponse200FlowValueModulesItemValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = GetHubFlowByIdResponse200FlowValueModulesItemValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = GetHubFlowByIdResponse200FlowValueModulesItemValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = GetHubFlowByIdResponse200FlowValueModulesItemValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, GetHubFlowByIdResponse200FlowValueModulesItemStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = GetHubFlowByIdResponse200FlowValueModulesItemStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[ + GetHubFlowByIdResponse200FlowValueModulesItemSleepType0, + GetHubFlowByIdResponse200FlowValueModulesItemSleepType1, + Unset, + ]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, GetHubFlowByIdResponse200FlowValueModulesItemSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = GetHubFlowByIdResponse200FlowValueModulesItemSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, GetHubFlowByIdResponse200FlowValueModulesItemSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = GetHubFlowByIdResponse200FlowValueModulesItemSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, GetHubFlowByIdResponse200FlowValueModulesItemRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = GetHubFlowByIdResponse200FlowValueModulesItemRetry.from_dict(_retry) + + get_hub_flow_by_id_response_200_flow_value_modules_item = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + get_hub_flow_by_id_response_200_flow_value_modules_item.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_modules_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms.py new file mode 100644 index 0000000000..8dcb0077f6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms.py @@ -0,0 +1,111 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_0 import ( + GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType0, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_1 import ( + GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueModulesItemInputTransforms") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueModulesItemInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType0, + GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType0, + GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType0.from_dict( + data + ) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType1.from_dict(data) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms.additional_properties = ( + additional_properties + ) + return get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType0, + GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType0, + GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..08506a6c8f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_0.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_0_type import ( + GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_0.additional_properties = ( + d + ) + return get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..0d946f26ef --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..ab1df72f33 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_1.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_1_type import ( + GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_1.additional_properties = ( + d + ) + return get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..6aebb0192d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetHubFlowByIdResponse200FlowValueModulesItemInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_retry.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_retry.py new file mode 100644 index 0000000000..c26a22b952 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_retry.py @@ -0,0 +1,86 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_retry_constant import ( + GetHubFlowByIdResponse200FlowValueModulesItemRetryConstant, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_retry_exponential import ( + GetHubFlowByIdResponse200FlowValueModulesItemRetryExponential, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueModulesItemRetry") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueModulesItemRetry: + """ + Attributes: + constant (Union[Unset, GetHubFlowByIdResponse200FlowValueModulesItemRetryConstant]): + exponential (Union[Unset, GetHubFlowByIdResponse200FlowValueModulesItemRetryExponential]): + """ + + constant: Union[Unset, GetHubFlowByIdResponse200FlowValueModulesItemRetryConstant] = UNSET + exponential: Union[Unset, GetHubFlowByIdResponse200FlowValueModulesItemRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, GetHubFlowByIdResponse200FlowValueModulesItemRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = GetHubFlowByIdResponse200FlowValueModulesItemRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, GetHubFlowByIdResponse200FlowValueModulesItemRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = GetHubFlowByIdResponse200FlowValueModulesItemRetryExponential.from_dict(_exponential) + + get_hub_flow_by_id_response_200_flow_value_modules_item_retry = cls( + constant=constant, + exponential=exponential, + ) + + get_hub_flow_by_id_response_200_flow_value_modules_item_retry.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_modules_item_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_retry_constant.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_retry_constant.py new file mode 100644 index 0000000000..873316f554 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueModulesItemRetryConstant") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueModulesItemRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + get_hub_flow_by_id_response_200_flow_value_modules_item_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + get_hub_flow_by_id_response_200_flow_value_modules_item_retry_constant.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_modules_item_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_retry_exponential.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_retry_exponential.py new file mode 100644 index 0000000000..bb874f3487 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueModulesItemRetryExponential") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueModulesItemRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + get_hub_flow_by_id_response_200_flow_value_modules_item_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + get_hub_flow_by_id_response_200_flow_value_modules_item_retry_exponential.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_modules_item_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_0.py new file mode 100644 index 0000000000..9616009881 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_0_type import ( + GetHubFlowByIdResponse200FlowValueModulesItemSleepType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueModulesItemSleepType0") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueModulesItemSleepType0: + """ + Attributes: + type (GetHubFlowByIdResponse200FlowValueModulesItemSleepType0Type): + value (Union[Unset, Any]): + """ + + type: GetHubFlowByIdResponse200FlowValueModulesItemSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetHubFlowByIdResponse200FlowValueModulesItemSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_0 = cls( + type=type, + value=value, + ) + + get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_0.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_0_type.py new file mode 100644 index 0000000000..dca9a1045c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetHubFlowByIdResponse200FlowValueModulesItemSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_1.py new file mode 100644 index 0000000000..a4c8506a54 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_1_type import ( + GetHubFlowByIdResponse200FlowValueModulesItemSleepType1Type, +) + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueModulesItemSleepType1") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueModulesItemSleepType1: + """ + Attributes: + expr (str): + type (GetHubFlowByIdResponse200FlowValueModulesItemSleepType1Type): + """ + + expr: str + type: GetHubFlowByIdResponse200FlowValueModulesItemSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = GetHubFlowByIdResponse200FlowValueModulesItemSleepType1Type(d.pop("type")) + + get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_1.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_1_type.py new file mode 100644 index 0000000000..6bc9e10fc5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetHubFlowByIdResponse200FlowValueModulesItemSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_stop_after_if.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_stop_after_if.py new file mode 100644 index 0000000000..7ad6b94096 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueModulesItemStopAfterIf") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueModulesItemStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + get_hub_flow_by_id_response_200_flow_value_modules_item_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + get_hub_flow_by_id_response_200_flow_value_modules_item_stop_after_if.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_modules_item_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_0.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_0.py new file mode 100644 index 0000000000..94ad36d864 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_0_language import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueModulesItemValueType0") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueModulesItemValueType0: + """ + Attributes: + content (str): + language (GetHubFlowByIdResponse200FlowValueModulesItemValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: GetHubFlowByIdResponse200FlowValueModulesItemValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = GetHubFlowByIdResponse200FlowValueModulesItemValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_0.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_0_language.py new file mode 100644 index 0000000000..3cb947761f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class GetHubFlowByIdResponse200FlowValueModulesItemValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_1.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_1.py new file mode 100644 index 0000000000..a229996456 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_1_type import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType1Type, +) + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueModulesItemValueType1") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueModulesItemValueType1: + """ + Attributes: + path (str): + type (GetHubFlowByIdResponse200FlowValueModulesItemValueType1Type): + """ + + path: str + type: GetHubFlowByIdResponse200FlowValueModulesItemValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = GetHubFlowByIdResponse200FlowValueModulesItemValueType1Type(d.pop("type")) + + get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_1 = cls( + path=path, + type=type, + ) + + get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_1.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_1_type.py new file mode 100644 index 0000000000..da2046ebfc --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetHubFlowByIdResponse200FlowValueModulesItemValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2.py new file mode 100644 index 0000000000..63a805fedf --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2.py @@ -0,0 +1,112 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_0 import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType0, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_1 import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType1, +) +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_type import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType2Type, +) + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueModulesItemValueType2") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueModulesItemValueType2: + """ + Attributes: + iterator (Union[GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType0, + GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType1]): + skip_failures (bool): + type (GetHubFlowByIdResponse200FlowValueModulesItemValueType2Type): + """ + + iterator: Union[ + GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType0, + GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType1, + ] + skip_failures: bool + type: GetHubFlowByIdResponse200FlowValueModulesItemValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType0, + GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = GetHubFlowByIdResponse200FlowValueModulesItemValueType2Type(d.pop("type")) + + get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..95d96c1687 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_0_type import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType0: + """ + Attributes: + type (GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_0.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..a7b273e021 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..be2aee5305 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_1_type import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType1: + """ + Attributes: + expr (str): + type (GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType1Type): + """ + + expr: str + type: GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType1Type(d.pop("type")) + + get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_1.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..60365d44c2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetHubFlowByIdResponse200FlowValueModulesItemValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_type.py new file mode 100644 index 0000000000..a7bcacddd0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetHubFlowByIdResponse200FlowValueModulesItemValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_3.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_3.py new file mode 100644 index 0000000000..16b05b4ac3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_3.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_3_type import ( + GetHubFlowByIdResponse200FlowValueModulesItemValueType3Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetHubFlowByIdResponse200FlowValueModulesItemValueType3") + + +@attr.s(auto_attribs=True) +class GetHubFlowByIdResponse200FlowValueModulesItemValueType3: + """ + Attributes: + type (GetHubFlowByIdResponse200FlowValueModulesItemValueType3Type): + path (Union[Unset, str]): + """ + + type: GetHubFlowByIdResponse200FlowValueModulesItemValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = GetHubFlowByIdResponse200FlowValueModulesItemValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_3 = cls( + type=type, + path=path, + ) + + get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_3.additional_properties = d + return get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_3_type.py new file mode 100644 index 0000000000..b0c0907820 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_hub_flow_by_id_response_200_flow_value_modules_item_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GetHubFlowByIdResponse200FlowValueModulesItemValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_job_response_200.py b/python-client/windmill-api/windmill_api/models/get_job_response_200.py new file mode 100644 index 0000000000..3e9cbfa660 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_job_response_200.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_job_response_200_type import GetJobResponse200Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetJobResponse200") + + +@attr.s(auto_attribs=True) +class GetJobResponse200: + """ + Attributes: + type (Union[Unset, GetJobResponse200Type]): + """ + + type: Union[Unset, GetJobResponse200Type] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, GetJobResponse200Type] + if isinstance(_type, Unset): + type = UNSET + else: + type = GetJobResponse200Type(_type) + + get_job_response_200 = cls( + type=type, + ) + + get_job_response_200.additional_properties = d + return get_job_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_job_response_200_type.py b/python-client/windmill-api/windmill_api/models/get_job_response_200_type.py new file mode 100644 index 0000000000..51a43c2a68 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_job_response_200_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class GetJobResponse200Type(str, Enum): + COMPLETEDJOB = "CompletedJob" + QUEUEDJOB = "QueuedJob" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_job_updates_response_200.py b/python-client/windmill-api/windmill_api/models/get_job_updates_response_200.py new file mode 100644 index 0000000000..7adef9f5a6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_job_updates_response_200.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetJobUpdatesResponse200") + + +@attr.s(auto_attribs=True) +class GetJobUpdatesResponse200: + """ + Attributes: + running (Union[Unset, bool]): + completed (Union[Unset, bool]): + new_logs (Union[Unset, str]): + """ + + running: Union[Unset, bool] = UNSET + completed: Union[Unset, bool] = UNSET + new_logs: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + running = self.running + completed = self.completed + new_logs = self.new_logs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if running is not UNSET: + field_dict["running"] = running + if completed is not UNSET: + field_dict["completed"] = completed + if new_logs is not UNSET: + field_dict["new_logs"] = new_logs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + running = d.pop("running", UNSET) + + completed = d.pop("completed", UNSET) + + new_logs = d.pop("new_logs", UNSET) + + get_job_updates_response_200 = cls( + running=running, + completed=completed, + new_logs=new_logs, + ) + + get_job_updates_response_200.additional_properties = d + return get_job_updates_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_resource_response_200.py b/python-client/windmill-api/windmill_api/models/get_resource_response_200.py new file mode 100644 index 0000000000..46ec525600 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_resource_response_200.py @@ -0,0 +1,122 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_resource_response_200_extra_perms import GetResourceResponse200ExtraPerms +from ..models.get_resource_response_200_value import GetResourceResponse200Value +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetResourceResponse200") + + +@attr.s(auto_attribs=True) +class GetResourceResponse200: + """ + Attributes: + path (str): + resource_type (str): + is_oauth (bool): + workspace_id (Union[Unset, str]): + description (Union[Unset, str]): + value (Union[Unset, GetResourceResponse200Value]): + extra_perms (Union[Unset, GetResourceResponse200ExtraPerms]): + """ + + path: str + resource_type: str + is_oauth: bool + workspace_id: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + value: Union[Unset, GetResourceResponse200Value] = UNSET + extra_perms: Union[Unset, GetResourceResponse200ExtraPerms] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + resource_type = self.resource_type + is_oauth = self.is_oauth + workspace_id = self.workspace_id + description = self.description + value: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.value, Unset): + value = self.value.to_dict() + + extra_perms: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.extra_perms, Unset): + extra_perms = self.extra_perms.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "resource_type": resource_type, + "is_oauth": is_oauth, + } + ) + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if description is not UNSET: + field_dict["description"] = description + if value is not UNSET: + field_dict["value"] = value + if extra_perms is not UNSET: + field_dict["extra_perms"] = extra_perms + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + resource_type = d.pop("resource_type") + + is_oauth = d.pop("is_oauth") + + workspace_id = d.pop("workspace_id", UNSET) + + description = d.pop("description", UNSET) + + _value = d.pop("value", UNSET) + value: Union[Unset, GetResourceResponse200Value] + if isinstance(_value, Unset): + value = UNSET + else: + value = GetResourceResponse200Value.from_dict(_value) + + _extra_perms = d.pop("extra_perms", UNSET) + extra_perms: Union[Unset, GetResourceResponse200ExtraPerms] + if isinstance(_extra_perms, Unset): + extra_perms = UNSET + else: + extra_perms = GetResourceResponse200ExtraPerms.from_dict(_extra_perms) + + get_resource_response_200 = cls( + path=path, + resource_type=resource_type, + is_oauth=is_oauth, + workspace_id=workspace_id, + description=description, + value=value, + extra_perms=extra_perms, + ) + + get_resource_response_200.additional_properties = d + return get_resource_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_resource_response_200_extra_perms.py b/python-client/windmill-api/windmill_api/models/get_resource_response_200_extra_perms.py new file mode 100644 index 0000000000..fd53f00d75 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_resource_response_200_extra_perms.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="GetResourceResponse200ExtraPerms") + + +@attr.s(auto_attribs=True) +class GetResourceResponse200ExtraPerms: + """ """ + + additional_properties: Dict[str, bool] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + get_resource_response_200_extra_perms = cls() + + get_resource_response_200_extra_perms.additional_properties = d + return get_resource_response_200_extra_perms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> bool: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: bool) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_resource_response_200_value.py b/python-client/windmill-api/windmill_api/models/get_resource_response_200_value.py new file mode 100644 index 0000000000..014a1703b9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_resource_response_200_value.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="GetResourceResponse200Value") + + +@attr.s(auto_attribs=True) +class GetResourceResponse200Value: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + get_resource_response_200_value = cls() + + get_resource_response_200_value.additional_properties = d + return get_resource_response_200_value + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_resource_type_response_200.py b/python-client/windmill-api/windmill_api/models/get_resource_type_response_200.py new file mode 100644 index 0000000000..d328e8ab8c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_resource_type_response_200.py @@ -0,0 +1,83 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetResourceTypeResponse200") + + +@attr.s(auto_attribs=True) +class GetResourceTypeResponse200: + """ + Attributes: + name (str): + workspace_id (Union[Unset, str]): + schema (Union[Unset, Any]): + description (Union[Unset, str]): + """ + + name: str + workspace_id: Union[Unset, str] = UNSET + schema: Union[Unset, Any] = UNSET + description: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + workspace_id = self.workspace_id + schema = self.schema + description = self.description + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if schema is not UNSET: + field_dict["schema"] = schema + if description is not UNSET: + field_dict["description"] = description + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name") + + workspace_id = d.pop("workspace_id", UNSET) + + schema = d.pop("schema", UNSET) + + description = d.pop("description", UNSET) + + get_resource_type_response_200 = cls( + name=name, + workspace_id=workspace_id, + schema=schema, + description=description, + ) + + get_resource_type_response_200.additional_properties = d + return get_resource_type_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_schedule_response_200.py b/python-client/windmill-api/windmill_api/models/get_schedule_response_200.py new file mode 100644 index 0000000000..27cbcc06c6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_schedule_response_200.py @@ -0,0 +1,136 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.get_schedule_response_200_args import GetScheduleResponse200Args +from ..models.get_schedule_response_200_extra_perms import GetScheduleResponse200ExtraPerms +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetScheduleResponse200") + + +@attr.s(auto_attribs=True) +class GetScheduleResponse200: + """ + Attributes: + path (str): + edited_by (str): + edited_at (datetime.datetime): + schedule (str): + offset (int): + enabled (bool): + script_path (str): + is_flow (bool): + extra_perms (GetScheduleResponse200ExtraPerms): + args (Union[Unset, GetScheduleResponse200Args]): + """ + + path: str + edited_by: str + edited_at: datetime.datetime + schedule: str + offset: int + enabled: bool + script_path: str + is_flow: bool + extra_perms: GetScheduleResponse200ExtraPerms + args: Union[Unset, GetScheduleResponse200Args] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + edited_by = self.edited_by + edited_at = self.edited_at.isoformat() + + schedule = self.schedule + offset = self.offset + enabled = self.enabled + script_path = self.script_path + is_flow = self.is_flow + extra_perms = self.extra_perms.to_dict() + + args: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.args, Unset): + args = self.args.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "edited_by": edited_by, + "edited_at": edited_at, + "schedule": schedule, + "offset_": offset, + "enabled": enabled, + "script_path": script_path, + "is_flow": is_flow, + "extra_perms": extra_perms, + } + ) + if args is not UNSET: + field_dict["args"] = args + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + edited_by = d.pop("edited_by") + + edited_at = isoparse(d.pop("edited_at")) + + schedule = d.pop("schedule") + + offset = d.pop("offset_") + + enabled = d.pop("enabled") + + script_path = d.pop("script_path") + + is_flow = d.pop("is_flow") + + extra_perms = GetScheduleResponse200ExtraPerms.from_dict(d.pop("extra_perms")) + + _args = d.pop("args", UNSET) + args: Union[Unset, GetScheduleResponse200Args] + if isinstance(_args, Unset): + args = UNSET + else: + args = GetScheduleResponse200Args.from_dict(_args) + + get_schedule_response_200 = cls( + path=path, + edited_by=edited_by, + edited_at=edited_at, + schedule=schedule, + offset=offset, + enabled=enabled, + script_path=script_path, + is_flow=is_flow, + extra_perms=extra_perms, + args=args, + ) + + get_schedule_response_200.additional_properties = d + return get_schedule_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_schedule_response_200_args.py b/python-client/windmill-api/windmill_api/models/get_schedule_response_200_args.py new file mode 100644 index 0000000000..26837d5b45 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_schedule_response_200_args.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="GetScheduleResponse200Args") + + +@attr.s(auto_attribs=True) +class GetScheduleResponse200Args: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + get_schedule_response_200_args = cls() + + get_schedule_response_200_args.additional_properties = d + return get_schedule_response_200_args + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_schedule_response_200_extra_perms.py b/python-client/windmill-api/windmill_api/models/get_schedule_response_200_extra_perms.py new file mode 100644 index 0000000000..57154a92a7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_schedule_response_200_extra_perms.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="GetScheduleResponse200ExtraPerms") + + +@attr.s(auto_attribs=True) +class GetScheduleResponse200ExtraPerms: + """ """ + + additional_properties: Dict[str, bool] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + get_schedule_response_200_extra_perms = cls() + + get_schedule_response_200_extra_perms.additional_properties = d + return get_schedule_response_200_extra_perms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> bool: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: bool) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_script_by_hash_response_200.py b/python-client/windmill-api/windmill_api/models/get_script_by_hash_response_200.py new file mode 100644 index 0000000000..0baa8a223f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_script_by_hash_response_200.py @@ -0,0 +1,206 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr +from dateutil.parser import isoparse + +from ..models.get_script_by_hash_response_200_extra_perms import GetScriptByHashResponse200ExtraPerms +from ..models.get_script_by_hash_response_200_kind import GetScriptByHashResponse200Kind +from ..models.get_script_by_hash_response_200_language import GetScriptByHashResponse200Language +from ..models.get_script_by_hash_response_200_schema import GetScriptByHashResponse200Schema +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetScriptByHashResponse200") + + +@attr.s(auto_attribs=True) +class GetScriptByHashResponse200: + """ + Attributes: + hash_ (str): + path (str): + summary (str): + content (str): + created_by (str): + created_at (datetime.datetime): + archived (bool): + deleted (bool): + is_template (bool): + extra_perms (GetScriptByHashResponse200ExtraPerms): + language (GetScriptByHashResponse200Language): + kind (GetScriptByHashResponse200Kind): + workspace_id (Union[Unset, str]): + parent_hashes (Union[Unset, List[str]]): The first element is the direct parent of the script, the second is the + parent of the first, etc + description (Union[Unset, str]): + schema (Union[Unset, GetScriptByHashResponse200Schema]): + lock (Union[Unset, str]): + lock_error_logs (Union[Unset, str]): + """ + + hash_: str + path: str + summary: str + content: str + created_by: str + created_at: datetime.datetime + archived: bool + deleted: bool + is_template: bool + extra_perms: GetScriptByHashResponse200ExtraPerms + language: GetScriptByHashResponse200Language + kind: GetScriptByHashResponse200Kind + workspace_id: Union[Unset, str] = UNSET + parent_hashes: Union[Unset, List[str]] = UNSET + description: Union[Unset, str] = UNSET + schema: Union[Unset, GetScriptByHashResponse200Schema] = UNSET + lock: Union[Unset, str] = UNSET + lock_error_logs: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + hash_ = self.hash_ + path = self.path + summary = self.summary + content = self.content + created_by = self.created_by + created_at = self.created_at.isoformat() + + archived = self.archived + deleted = self.deleted + is_template = self.is_template + extra_perms = self.extra_perms.to_dict() + + language = self.language.value + + kind = self.kind.value + + workspace_id = self.workspace_id + parent_hashes: Union[Unset, List[str]] = UNSET + if not isinstance(self.parent_hashes, Unset): + parent_hashes = self.parent_hashes + + description = self.description + schema: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.schema, Unset): + schema = self.schema.to_dict() + + lock = self.lock + lock_error_logs = self.lock_error_logs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "hash": hash_, + "path": path, + "summary": summary, + "content": content, + "created_by": created_by, + "created_at": created_at, + "archived": archived, + "deleted": deleted, + "is_template": is_template, + "extra_perms": extra_perms, + "language": language, + "kind": kind, + } + ) + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if parent_hashes is not UNSET: + field_dict["parent_hashes"] = parent_hashes + if description is not UNSET: + field_dict["description"] = description + if schema is not UNSET: + field_dict["schema"] = schema + if lock is not UNSET: + field_dict["lock"] = lock + if lock_error_logs is not UNSET: + field_dict["lock_error_logs"] = lock_error_logs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + hash_ = d.pop("hash") + + path = d.pop("path") + + summary = d.pop("summary") + + content = d.pop("content") + + created_by = d.pop("created_by") + + created_at = isoparse(d.pop("created_at")) + + archived = d.pop("archived") + + deleted = d.pop("deleted") + + is_template = d.pop("is_template") + + extra_perms = GetScriptByHashResponse200ExtraPerms.from_dict(d.pop("extra_perms")) + + language = GetScriptByHashResponse200Language(d.pop("language")) + + kind = GetScriptByHashResponse200Kind(d.pop("kind")) + + workspace_id = d.pop("workspace_id", UNSET) + + parent_hashes = cast(List[str], d.pop("parent_hashes", UNSET)) + + description = d.pop("description", UNSET) + + _schema = d.pop("schema", UNSET) + schema: Union[Unset, GetScriptByHashResponse200Schema] + if isinstance(_schema, Unset): + schema = UNSET + else: + schema = GetScriptByHashResponse200Schema.from_dict(_schema) + + lock = d.pop("lock", UNSET) + + lock_error_logs = d.pop("lock_error_logs", UNSET) + + get_script_by_hash_response_200 = cls( + hash_=hash_, + path=path, + summary=summary, + content=content, + created_by=created_by, + created_at=created_at, + archived=archived, + deleted=deleted, + is_template=is_template, + extra_perms=extra_perms, + language=language, + kind=kind, + workspace_id=workspace_id, + parent_hashes=parent_hashes, + description=description, + schema=schema, + lock=lock, + lock_error_logs=lock_error_logs, + ) + + get_script_by_hash_response_200.additional_properties = d + return get_script_by_hash_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_script_by_hash_response_200_extra_perms.py b/python-client/windmill-api/windmill_api/models/get_script_by_hash_response_200_extra_perms.py new file mode 100644 index 0000000000..04598a6fc9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_script_by_hash_response_200_extra_perms.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="GetScriptByHashResponse200ExtraPerms") + + +@attr.s(auto_attribs=True) +class GetScriptByHashResponse200ExtraPerms: + """ """ + + additional_properties: Dict[str, bool] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + get_script_by_hash_response_200_extra_perms = cls() + + get_script_by_hash_response_200_extra_perms.additional_properties = d + return get_script_by_hash_response_200_extra_perms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> bool: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: bool) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_script_by_hash_response_200_kind.py b/python-client/windmill-api/windmill_api/models/get_script_by_hash_response_200_kind.py new file mode 100644 index 0000000000..15ee981f2f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_script_by_hash_response_200_kind.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class GetScriptByHashResponse200Kind(str, Enum): + SCRIPT = "script" + FAILURE = "failure" + TRIGGER = "trigger" + COMMAND = "command" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_script_by_hash_response_200_language.py b/python-client/windmill-api/windmill_api/models/get_script_by_hash_response_200_language.py new file mode 100644 index 0000000000..356fc5575b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_script_by_hash_response_200_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class GetScriptByHashResponse200Language(str, Enum): + PYTHON3 = "python3" + DENO = "deno" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_script_by_hash_response_200_schema.py b/python-client/windmill-api/windmill_api/models/get_script_by_hash_response_200_schema.py new file mode 100644 index 0000000000..e390665e6a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_script_by_hash_response_200_schema.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="GetScriptByHashResponse200Schema") + + +@attr.s(auto_attribs=True) +class GetScriptByHashResponse200Schema: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + get_script_by_hash_response_200_schema = cls() + + get_script_by_hash_response_200_schema.additional_properties = d + return get_script_by_hash_response_200_schema + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_script_by_path_response_200.py b/python-client/windmill-api/windmill_api/models/get_script_by_path_response_200.py new file mode 100644 index 0000000000..ebacfaa81f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_script_by_path_response_200.py @@ -0,0 +1,206 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr +from dateutil.parser import isoparse + +from ..models.get_script_by_path_response_200_extra_perms import GetScriptByPathResponse200ExtraPerms +from ..models.get_script_by_path_response_200_kind import GetScriptByPathResponse200Kind +from ..models.get_script_by_path_response_200_language import GetScriptByPathResponse200Language +from ..models.get_script_by_path_response_200_schema import GetScriptByPathResponse200Schema +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetScriptByPathResponse200") + + +@attr.s(auto_attribs=True) +class GetScriptByPathResponse200: + """ + Attributes: + hash_ (str): + path (str): + summary (str): + content (str): + created_by (str): + created_at (datetime.datetime): + archived (bool): + deleted (bool): + is_template (bool): + extra_perms (GetScriptByPathResponse200ExtraPerms): + language (GetScriptByPathResponse200Language): + kind (GetScriptByPathResponse200Kind): + workspace_id (Union[Unset, str]): + parent_hashes (Union[Unset, List[str]]): The first element is the direct parent of the script, the second is the + parent of the first, etc + description (Union[Unset, str]): + schema (Union[Unset, GetScriptByPathResponse200Schema]): + lock (Union[Unset, str]): + lock_error_logs (Union[Unset, str]): + """ + + hash_: str + path: str + summary: str + content: str + created_by: str + created_at: datetime.datetime + archived: bool + deleted: bool + is_template: bool + extra_perms: GetScriptByPathResponse200ExtraPerms + language: GetScriptByPathResponse200Language + kind: GetScriptByPathResponse200Kind + workspace_id: Union[Unset, str] = UNSET + parent_hashes: Union[Unset, List[str]] = UNSET + description: Union[Unset, str] = UNSET + schema: Union[Unset, GetScriptByPathResponse200Schema] = UNSET + lock: Union[Unset, str] = UNSET + lock_error_logs: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + hash_ = self.hash_ + path = self.path + summary = self.summary + content = self.content + created_by = self.created_by + created_at = self.created_at.isoformat() + + archived = self.archived + deleted = self.deleted + is_template = self.is_template + extra_perms = self.extra_perms.to_dict() + + language = self.language.value + + kind = self.kind.value + + workspace_id = self.workspace_id + parent_hashes: Union[Unset, List[str]] = UNSET + if not isinstance(self.parent_hashes, Unset): + parent_hashes = self.parent_hashes + + description = self.description + schema: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.schema, Unset): + schema = self.schema.to_dict() + + lock = self.lock + lock_error_logs = self.lock_error_logs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "hash": hash_, + "path": path, + "summary": summary, + "content": content, + "created_by": created_by, + "created_at": created_at, + "archived": archived, + "deleted": deleted, + "is_template": is_template, + "extra_perms": extra_perms, + "language": language, + "kind": kind, + } + ) + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if parent_hashes is not UNSET: + field_dict["parent_hashes"] = parent_hashes + if description is not UNSET: + field_dict["description"] = description + if schema is not UNSET: + field_dict["schema"] = schema + if lock is not UNSET: + field_dict["lock"] = lock + if lock_error_logs is not UNSET: + field_dict["lock_error_logs"] = lock_error_logs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + hash_ = d.pop("hash") + + path = d.pop("path") + + summary = d.pop("summary") + + content = d.pop("content") + + created_by = d.pop("created_by") + + created_at = isoparse(d.pop("created_at")) + + archived = d.pop("archived") + + deleted = d.pop("deleted") + + is_template = d.pop("is_template") + + extra_perms = GetScriptByPathResponse200ExtraPerms.from_dict(d.pop("extra_perms")) + + language = GetScriptByPathResponse200Language(d.pop("language")) + + kind = GetScriptByPathResponse200Kind(d.pop("kind")) + + workspace_id = d.pop("workspace_id", UNSET) + + parent_hashes = cast(List[str], d.pop("parent_hashes", UNSET)) + + description = d.pop("description", UNSET) + + _schema = d.pop("schema", UNSET) + schema: Union[Unset, GetScriptByPathResponse200Schema] + if isinstance(_schema, Unset): + schema = UNSET + else: + schema = GetScriptByPathResponse200Schema.from_dict(_schema) + + lock = d.pop("lock", UNSET) + + lock_error_logs = d.pop("lock_error_logs", UNSET) + + get_script_by_path_response_200 = cls( + hash_=hash_, + path=path, + summary=summary, + content=content, + created_by=created_by, + created_at=created_at, + archived=archived, + deleted=deleted, + is_template=is_template, + extra_perms=extra_perms, + language=language, + kind=kind, + workspace_id=workspace_id, + parent_hashes=parent_hashes, + description=description, + schema=schema, + lock=lock, + lock_error_logs=lock_error_logs, + ) + + get_script_by_path_response_200.additional_properties = d + return get_script_by_path_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_script_by_path_response_200_extra_perms.py b/python-client/windmill-api/windmill_api/models/get_script_by_path_response_200_extra_perms.py new file mode 100644 index 0000000000..ed970a7761 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_script_by_path_response_200_extra_perms.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="GetScriptByPathResponse200ExtraPerms") + + +@attr.s(auto_attribs=True) +class GetScriptByPathResponse200ExtraPerms: + """ """ + + additional_properties: Dict[str, bool] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + get_script_by_path_response_200_extra_perms = cls() + + get_script_by_path_response_200_extra_perms.additional_properties = d + return get_script_by_path_response_200_extra_perms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> bool: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: bool) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_script_by_path_response_200_kind.py b/python-client/windmill-api/windmill_api/models/get_script_by_path_response_200_kind.py new file mode 100644 index 0000000000..1a1ed19d83 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_script_by_path_response_200_kind.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class GetScriptByPathResponse200Kind(str, Enum): + SCRIPT = "script" + FAILURE = "failure" + TRIGGER = "trigger" + COMMAND = "command" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_script_by_path_response_200_language.py b/python-client/windmill-api/windmill_api/models/get_script_by_path_response_200_language.py new file mode 100644 index 0000000000..346128e223 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_script_by_path_response_200_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class GetScriptByPathResponse200Language(str, Enum): + PYTHON3 = "python3" + DENO = "deno" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/get_script_by_path_response_200_schema.py b/python-client/windmill-api/windmill_api/models/get_script_by_path_response_200_schema.py new file mode 100644 index 0000000000..4c4ed1b804 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_script_by_path_response_200_schema.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="GetScriptByPathResponse200Schema") + + +@attr.s(auto_attribs=True) +class GetScriptByPathResponse200Schema: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + get_script_by_path_response_200_schema = cls() + + get_script_by_path_response_200_schema.additional_properties = d + return get_script_by_path_response_200_schema + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_script_deployment_status_response_200.py b/python-client/windmill-api/windmill_api/models/get_script_deployment_status_response_200.py new file mode 100644 index 0000000000..14b303574a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_script_deployment_status_response_200.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetScriptDeploymentStatusResponse200") + + +@attr.s(auto_attribs=True) +class GetScriptDeploymentStatusResponse200: + """ + Attributes: + lock (Union[Unset, str]): + lock_error_logs (Union[Unset, str]): + """ + + lock: Union[Unset, str] = UNSET + lock_error_logs: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + lock = self.lock + lock_error_logs = self.lock_error_logs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if lock is not UNSET: + field_dict["lock"] = lock + if lock_error_logs is not UNSET: + field_dict["lock_error_logs"] = lock_error_logs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + lock = d.pop("lock", UNSET) + + lock_error_logs = d.pop("lock_error_logs", UNSET) + + get_script_deployment_status_response_200 = cls( + lock=lock, + lock_error_logs=lock_error_logs, + ) + + get_script_deployment_status_response_200.additional_properties = d + return get_script_deployment_status_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_settings_response_200.py b/python-client/windmill-api/windmill_api/models/get_settings_response_200.py new file mode 100644 index 0000000000..0b065cfc1c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_settings_response_200.py @@ -0,0 +1,81 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetSettingsResponse200") + + +@attr.s(auto_attribs=True) +class GetSettingsResponse200: + """ + Attributes: + workspace_id (Union[Unset, str]): + slack_name (Union[Unset, str]): + slack_team_id (Union[Unset, str]): + slack_command_script (Union[Unset, str]): + """ + + workspace_id: Union[Unset, str] = UNSET + slack_name: Union[Unset, str] = UNSET + slack_team_id: Union[Unset, str] = UNSET + slack_command_script: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + workspace_id = self.workspace_id + slack_name = self.slack_name + slack_team_id = self.slack_team_id + slack_command_script = self.slack_command_script + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if slack_name is not UNSET: + field_dict["slack_name"] = slack_name + if slack_team_id is not UNSET: + field_dict["slack_team_id"] = slack_team_id + if slack_command_script is not UNSET: + field_dict["slack_command_script"] = slack_command_script + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + workspace_id = d.pop("workspace_id", UNSET) + + slack_name = d.pop("slack_name", UNSET) + + slack_team_id = d.pop("slack_team_id", UNSET) + + slack_command_script = d.pop("slack_command_script", UNSET) + + get_settings_response_200 = cls( + workspace_id=workspace_id, + slack_name=slack_name, + slack_team_id=slack_team_id, + slack_command_script=slack_command_script, + ) + + get_settings_response_200.additional_properties = d + return get_settings_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_variable_response_200.py b/python-client/windmill-api/windmill_api/models/get_variable_response_200.py new file mode 100644 index 0000000000..8c65121ade --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_variable_response_200.py @@ -0,0 +1,114 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.get_variable_response_200_extra_perms import GetVariableResponse200ExtraPerms +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetVariableResponse200") + + +@attr.s(auto_attribs=True) +class GetVariableResponse200: + """ + Attributes: + workspace_id (str): + path (str): + is_secret (bool): + extra_perms (GetVariableResponse200ExtraPerms): + value (Union[Unset, str]): + description (Union[Unset, str]): + account (Union[Unset, str]): + is_oauth (Union[Unset, bool]): + """ + + workspace_id: str + path: str + is_secret: bool + extra_perms: GetVariableResponse200ExtraPerms + value: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + account: Union[Unset, str] = UNSET + is_oauth: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + workspace_id = self.workspace_id + path = self.path + is_secret = self.is_secret + extra_perms = self.extra_perms.to_dict() + + value = self.value + description = self.description + account = self.account + is_oauth = self.is_oauth + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "workspace_id": workspace_id, + "path": path, + "is_secret": is_secret, + "extra_perms": extra_perms, + } + ) + if value is not UNSET: + field_dict["value"] = value + if description is not UNSET: + field_dict["description"] = description + if account is not UNSET: + field_dict["account"] = account + if is_oauth is not UNSET: + field_dict["is_oauth"] = is_oauth + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + workspace_id = d.pop("workspace_id") + + path = d.pop("path") + + is_secret = d.pop("is_secret") + + extra_perms = GetVariableResponse200ExtraPerms.from_dict(d.pop("extra_perms")) + + value = d.pop("value", UNSET) + + description = d.pop("description", UNSET) + + account = d.pop("account", UNSET) + + is_oauth = d.pop("is_oauth", UNSET) + + get_variable_response_200 = cls( + workspace_id=workspace_id, + path=path, + is_secret=is_secret, + extra_perms=extra_perms, + value=value, + description=description, + account=account, + is_oauth=is_oauth, + ) + + get_variable_response_200.additional_properties = d + return get_variable_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/get_variable_response_200_extra_perms.py b/python-client/windmill-api/windmill_api/models/get_variable_response_200_extra_perms.py new file mode 100644 index 0000000000..042310b89b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/get_variable_response_200_extra_perms.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="GetVariableResponse200ExtraPerms") + + +@attr.s(auto_attribs=True) +class GetVariableResponse200ExtraPerms: + """ """ + + additional_properties: Dict[str, bool] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + get_variable_response_200_extra_perms = cls() + + get_variable_response_200_extra_perms.additional_properties = d + return get_variable_response_200_extra_perms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> bool: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: bool) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/global_user_info.py b/python-client/windmill-api/windmill_api/models/global_user_info.py new file mode 100644 index 0000000000..875a39d744 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/global_user_info.py @@ -0,0 +1,98 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.global_user_info_login_type import GlobalUserInfoLoginType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GlobalUserInfo") + + +@attr.s(auto_attribs=True) +class GlobalUserInfo: + """ + Attributes: + email (str): + login_type (GlobalUserInfoLoginType): + super_admin (bool): + verified (bool): + name (Union[Unset, str]): + company (Union[Unset, str]): + """ + + email: str + login_type: GlobalUserInfoLoginType + super_admin: bool + verified: bool + name: Union[Unset, str] = UNSET + company: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + email = self.email + login_type = self.login_type.value + + super_admin = self.super_admin + verified = self.verified + name = self.name + company = self.company + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "email": email, + "login_type": login_type, + "super_admin": super_admin, + "verified": verified, + } + ) + if name is not UNSET: + field_dict["name"] = name + if company is not UNSET: + field_dict["company"] = company + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + email = d.pop("email") + + login_type = GlobalUserInfoLoginType(d.pop("login_type")) + + super_admin = d.pop("super_admin") + + verified = d.pop("verified") + + name = d.pop("name", UNSET) + + company = d.pop("company", UNSET) + + global_user_info = cls( + email=email, + login_type=login_type, + super_admin=super_admin, + verified=verified, + name=name, + company=company, + ) + + global_user_info.additional_properties = d + return global_user_info + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/global_user_info_login_type.py b/python-client/windmill-api/windmill_api/models/global_user_info_login_type.py new file mode 100644 index 0000000000..3b4a233352 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/global_user_info_login_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class GlobalUserInfoLoginType(str, Enum): + PASSWORD = "password" + GITHUB = "github" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/global_user_update_json_body.py b/python-client/windmill-api/windmill_api/models/global_user_update_json_body.py new file mode 100644 index 0000000000..f859e390e2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/global_user_update_json_body.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GlobalUserUpdateJsonBody") + + +@attr.s(auto_attribs=True) +class GlobalUserUpdateJsonBody: + """ + Attributes: + is_super_admin (Union[Unset, bool]): + """ + + is_super_admin: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + is_super_admin = self.is_super_admin + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if is_super_admin is not UNSET: + field_dict["is_super_admin"] = is_super_admin + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + is_super_admin = d.pop("is_super_admin", UNSET) + + global_user_update_json_body = cls( + is_super_admin=is_super_admin, + ) + + global_user_update_json_body.additional_properties = d + return global_user_update_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/global_whoami_response_200.py b/python-client/windmill-api/windmill_api/models/global_whoami_response_200.py new file mode 100644 index 0000000000..b563e4083e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/global_whoami_response_200.py @@ -0,0 +1,98 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.global_whoami_response_200_login_type import GlobalWhoamiResponse200LoginType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GlobalWhoamiResponse200") + + +@attr.s(auto_attribs=True) +class GlobalWhoamiResponse200: + """ + Attributes: + email (str): + login_type (GlobalWhoamiResponse200LoginType): + super_admin (bool): + verified (bool): + name (Union[Unset, str]): + company (Union[Unset, str]): + """ + + email: str + login_type: GlobalWhoamiResponse200LoginType + super_admin: bool + verified: bool + name: Union[Unset, str] = UNSET + company: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + email = self.email + login_type = self.login_type.value + + super_admin = self.super_admin + verified = self.verified + name = self.name + company = self.company + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "email": email, + "login_type": login_type, + "super_admin": super_admin, + "verified": verified, + } + ) + if name is not UNSET: + field_dict["name"] = name + if company is not UNSET: + field_dict["company"] = company + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + email = d.pop("email") + + login_type = GlobalWhoamiResponse200LoginType(d.pop("login_type")) + + super_admin = d.pop("super_admin") + + verified = d.pop("verified") + + name = d.pop("name", UNSET) + + company = d.pop("company", UNSET) + + global_whoami_response_200 = cls( + email=email, + login_type=login_type, + super_admin=super_admin, + verified=verified, + name=name, + company=company, + ) + + global_whoami_response_200.additional_properties = d + return global_whoami_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/global_whoami_response_200_login_type.py b/python-client/windmill-api/windmill_api/models/global_whoami_response_200_login_type.py new file mode 100644 index 0000000000..cdeff777db --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/global_whoami_response_200_login_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class GlobalWhoamiResponse200LoginType(str, Enum): + PASSWORD = "password" + GITHUB = "github" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200.py b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200.py new file mode 100644 index 0000000000..a522e56646 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.go_to_jsonschema_response_200_args_item import GoToJsonschemaResponse200ArgsItem +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GoToJsonschemaResponse200") + + +@attr.s(auto_attribs=True) +class GoToJsonschemaResponse200: + """ + Attributes: + star_args (bool): + args (List[GoToJsonschemaResponse200ArgsItem]): + star_kwargs (Union[Unset, bool]): + """ + + star_args: bool + args: List[GoToJsonschemaResponse200ArgsItem] + star_kwargs: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + star_args = self.star_args + args = [] + for args_item_data in self.args: + args_item = args_item_data.to_dict() + + args.append(args_item) + + star_kwargs = self.star_kwargs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "star_args": star_args, + "args": args, + } + ) + if star_kwargs is not UNSET: + field_dict["star_kwargs"] = star_kwargs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + star_args = d.pop("star_args") + + args = [] + _args = d.pop("args") + for args_item_data in _args: + args_item = GoToJsonschemaResponse200ArgsItem.from_dict(args_item_data) + + args.append(args_item) + + star_kwargs = d.pop("star_kwargs", UNSET) + + go_to_jsonschema_response_200 = cls( + star_args=star_args, + args=args, + star_kwargs=star_kwargs, + ) + + go_to_jsonschema_response_200.additional_properties = d + return go_to_jsonschema_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item.py b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item.py new file mode 100644 index 0000000000..12e55a1dcf --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item.py @@ -0,0 +1,157 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.go_to_jsonschema_response_200_args_item_typ_type_0 import GoToJsonschemaResponse200ArgsItemTypType0 +from ..models.go_to_jsonschema_response_200_args_item_typ_type_1 import GoToJsonschemaResponse200ArgsItemTypType1 +from ..models.go_to_jsonschema_response_200_args_item_typ_type_2 import GoToJsonschemaResponse200ArgsItemTypType2 +from ..models.go_to_jsonschema_response_200_args_item_typ_type_3 import GoToJsonschemaResponse200ArgsItemTypType3 +from ..models.go_to_jsonschema_response_200_args_item_typ_type_4 import GoToJsonschemaResponse200ArgsItemTypType4 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GoToJsonschemaResponse200ArgsItem") + + +@attr.s(auto_attribs=True) +class GoToJsonschemaResponse200ArgsItem: + """ + Attributes: + name (str): + typ (Union[GoToJsonschemaResponse200ArgsItemTypType0, GoToJsonschemaResponse200ArgsItemTypType1, + GoToJsonschemaResponse200ArgsItemTypType2, GoToJsonschemaResponse200ArgsItemTypType3, + GoToJsonschemaResponse200ArgsItemTypType4]): + has_default (Union[Unset, bool]): + default (Union[Unset, Any]): + """ + + name: str + typ: Union[ + GoToJsonschemaResponse200ArgsItemTypType0, + GoToJsonschemaResponse200ArgsItemTypType1, + GoToJsonschemaResponse200ArgsItemTypType2, + GoToJsonschemaResponse200ArgsItemTypType3, + GoToJsonschemaResponse200ArgsItemTypType4, + ] + has_default: Union[Unset, bool] = UNSET + default: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + + if isinstance(self.typ, GoToJsonschemaResponse200ArgsItemTypType0): + typ = self.typ.value + + elif isinstance(self.typ, GoToJsonschemaResponse200ArgsItemTypType1): + typ = self.typ.to_dict() + + elif isinstance(self.typ, GoToJsonschemaResponse200ArgsItemTypType2): + typ = self.typ.to_dict() + + elif isinstance(self.typ, GoToJsonschemaResponse200ArgsItemTypType3): + typ = self.typ.to_dict() + + else: + typ = self.typ.to_dict() + + has_default = self.has_default + default = self.default + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "typ": typ, + } + ) + if has_default is not UNSET: + field_dict["has_default"] = has_default + if default is not UNSET: + field_dict["default"] = default + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name") + + def _parse_typ( + data: object, + ) -> Union[ + GoToJsonschemaResponse200ArgsItemTypType0, + GoToJsonschemaResponse200ArgsItemTypType1, + GoToJsonschemaResponse200ArgsItemTypType2, + GoToJsonschemaResponse200ArgsItemTypType3, + GoToJsonschemaResponse200ArgsItemTypType4, + ]: + try: + if not isinstance(data, str): + raise TypeError() + typ_type_0 = GoToJsonschemaResponse200ArgsItemTypType0(data) + + return typ_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + typ_type_1 = GoToJsonschemaResponse200ArgsItemTypType1.from_dict(data) + + return typ_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + typ_type_2 = GoToJsonschemaResponse200ArgsItemTypType2.from_dict(data) + + return typ_type_2 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + typ_type_3 = GoToJsonschemaResponse200ArgsItemTypType3.from_dict(data) + + return typ_type_3 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + typ_type_4 = GoToJsonschemaResponse200ArgsItemTypType4.from_dict(data) + + return typ_type_4 + + typ = _parse_typ(d.pop("typ")) + + has_default = d.pop("has_default", UNSET) + + default = d.pop("default", UNSET) + + go_to_jsonschema_response_200_args_item = cls( + name=name, + typ=typ, + has_default=has_default, + default=default, + ) + + go_to_jsonschema_response_200_args_item.additional_properties = d + return go_to_jsonschema_response_200_args_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_0.py b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_0.py new file mode 100644 index 0000000000..42e06c41e2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_0.py @@ -0,0 +1,16 @@ +from enum import Enum + + +class GoToJsonschemaResponse200ArgsItemTypType0(str, Enum): + FLOAT = "float" + INT = "int" + BOOL = "bool" + EMAIL = "email" + UNKNOWN = "unknown" + BYTES = "bytes" + DICT = "dict" + DATETIME = "datetime" + SQL = "sql" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_1.py b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_1.py new file mode 100644 index 0000000000..3118ae8d42 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_1.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Optional, Type, TypeVar + +import attr + +T = TypeVar("T", bound="GoToJsonschemaResponse200ArgsItemTypType1") + + +@attr.s(auto_attribs=True) +class GoToJsonschemaResponse200ArgsItemTypType1: + """ + Attributes: + resource (Optional[str]): + """ + + resource: Optional[str] + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + resource = self.resource + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "resource": resource, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + resource = d.pop("resource") + + go_to_jsonschema_response_200_args_item_typ_type_1 = cls( + resource=resource, + ) + + go_to_jsonschema_response_200_args_item_typ_type_1.additional_properties = d + return go_to_jsonschema_response_200_args_item_typ_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_2.py b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_2.py new file mode 100644 index 0000000000..042584ac51 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_2.py @@ -0,0 +1,60 @@ +from typing import Any, Dict, List, Optional, Type, TypeVar, cast + +import attr + +T = TypeVar("T", bound="GoToJsonschemaResponse200ArgsItemTypType2") + + +@attr.s(auto_attribs=True) +class GoToJsonschemaResponse200ArgsItemTypType2: + """ + Attributes: + str_ (Optional[List[str]]): + """ + + str_: Optional[List[str]] + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if self.str_ is None: + str_ = None + else: + str_ = self.str_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "str": str_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + str_ = cast(List[str], d.pop("str")) + + go_to_jsonschema_response_200_args_item_typ_type_2 = cls( + str_=str_, + ) + + go_to_jsonschema_response_200_args_item_typ_type_2.additional_properties = d + return go_to_jsonschema_response_200_args_item_typ_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_3.py b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_3.py new file mode 100644 index 0000000000..00daaae99f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_3.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.go_to_jsonschema_response_200_args_item_typ_type_3_object_item import ( + GoToJsonschemaResponse200ArgsItemTypType3ObjectItem, +) + +T = TypeVar("T", bound="GoToJsonschemaResponse200ArgsItemTypType3") + + +@attr.s(auto_attribs=True) +class GoToJsonschemaResponse200ArgsItemTypType3: + """ + Attributes: + object_ (List[GoToJsonschemaResponse200ArgsItemTypType3ObjectItem]): + """ + + object_: List[GoToJsonschemaResponse200ArgsItemTypType3ObjectItem] + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + object_ = [] + for object_item_data in self.object_: + object_item = object_item_data.to_dict() + + object_.append(object_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "object": object_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + object_ = [] + _object_ = d.pop("object") + for object_item_data in _object_: + object_item = GoToJsonschemaResponse200ArgsItemTypType3ObjectItem.from_dict(object_item_data) + + object_.append(object_item) + + go_to_jsonschema_response_200_args_item_typ_type_3 = cls( + object_=object_, + ) + + go_to_jsonschema_response_200_args_item_typ_type_3.additional_properties = d + return go_to_jsonschema_response_200_args_item_typ_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_3_object_item.py b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_3_object_item.py new file mode 100644 index 0000000000..0ecd09bf6e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_3_object_item.py @@ -0,0 +1,100 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.go_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_0 import ( + GoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0, +) +from ..models.go_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1 import ( + GoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1, +) + +T = TypeVar("T", bound="GoToJsonschemaResponse200ArgsItemTypType3ObjectItem") + + +@attr.s(auto_attribs=True) +class GoToJsonschemaResponse200ArgsItemTypType3ObjectItem: + """ + Attributes: + key (str): + typ (Union[GoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0, + GoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1]): + """ + + key: str + typ: Union[ + GoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0, + GoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1, + ] + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + key = self.key + + if isinstance(self.typ, GoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0): + typ = self.typ.value + + else: + typ = self.typ.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "key": key, + "typ": typ, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + key = d.pop("key") + + def _parse_typ( + data: object, + ) -> Union[ + GoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0, + GoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1, + ]: + try: + if not isinstance(data, str): + raise TypeError() + typ_type_0 = GoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0(data) + + return typ_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + typ_type_1 = GoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1.from_dict(data) + + return typ_type_1 + + typ = _parse_typ(d.pop("typ")) + + go_to_jsonschema_response_200_args_item_typ_type_3_object_item = cls( + key=key, + typ=typ, + ) + + go_to_jsonschema_response_200_args_item_typ_type_3_object_item.additional_properties = d + return go_to_jsonschema_response_200_args_item_typ_type_3_object_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_0.py b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_0.py new file mode 100644 index 0000000000..5d0a698c08 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_0.py @@ -0,0 +1,16 @@ +from enum import Enum + + +class GoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0(str, Enum): + FLOAT = "float" + INT = "int" + BOOL = "bool" + EMAIL = "email" + UNKNOWN = "unknown" + BYTES = "bytes" + DICT = "dict" + DATETIME = "datetime" + SQL = "sql" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1.py b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1.py new file mode 100644 index 0000000000..c475398403 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="GoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1") + + +@attr.s(auto_attribs=True) +class GoToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1: + """ + Attributes: + str_ (Any): + """ + + str_: Any + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + str_ = self.str_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "str": str_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + str_ = d.pop("str") + + go_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1 = cls( + str_=str_, + ) + + go_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1.additional_properties = d + return go_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_4.py b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_4.py new file mode 100644 index 0000000000..e1537cd037 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_4.py @@ -0,0 +1,97 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.go_to_jsonschema_response_200_args_item_typ_type_4_list_type_0 import ( + GoToJsonschemaResponse200ArgsItemTypType4ListType0, +) +from ..models.go_to_jsonschema_response_200_args_item_typ_type_4_list_type_1 import ( + GoToJsonschemaResponse200ArgsItemTypType4ListType1, +) + +T = TypeVar("T", bound="GoToJsonschemaResponse200ArgsItemTypType4") + + +@attr.s(auto_attribs=True) +class GoToJsonschemaResponse200ArgsItemTypType4: + """ + Attributes: + list_ (Union[GoToJsonschemaResponse200ArgsItemTypType4ListType0, + GoToJsonschemaResponse200ArgsItemTypType4ListType1, None]): + """ + + list_: Union[ + GoToJsonschemaResponse200ArgsItemTypType4ListType0, GoToJsonschemaResponse200ArgsItemTypType4ListType1, None + ] + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + list_: Union[Dict[str, Any], None, str] + if self.list_ is None: + list_ = None + + elif isinstance(self.list_, GoToJsonschemaResponse200ArgsItemTypType4ListType0): + list_ = self.list_.value + + else: + list_ = self.list_.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "list": list_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_list_( + data: object, + ) -> Union[ + GoToJsonschemaResponse200ArgsItemTypType4ListType0, GoToJsonschemaResponse200ArgsItemTypType4ListType1, None + ]: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + list_type_0 = GoToJsonschemaResponse200ArgsItemTypType4ListType0(data) + + return list_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + list_type_1 = GoToJsonschemaResponse200ArgsItemTypType4ListType1.from_dict(data) + + return list_type_1 + + list_ = _parse_list_(d.pop("list")) + + go_to_jsonschema_response_200_args_item_typ_type_4 = cls( + list_=list_, + ) + + go_to_jsonschema_response_200_args_item_typ_type_4.additional_properties = d + return go_to_jsonschema_response_200_args_item_typ_type_4 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_4_list_type_0.py b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_4_list_type_0.py new file mode 100644 index 0000000000..30c38215dd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_4_list_type_0.py @@ -0,0 +1,16 @@ +from enum import Enum + + +class GoToJsonschemaResponse200ArgsItemTypType4ListType0(str, Enum): + FLOAT = "float" + INT = "int" + BOOL = "bool" + EMAIL = "email" + UNKNOWN = "unknown" + BYTES = "bytes" + DICT = "dict" + DATETIME = "datetime" + SQL = "sql" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_4_list_type_1.py b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_4_list_type_1.py new file mode 100644 index 0000000000..852d487782 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/go_to_jsonschema_response_200_args_item_typ_type_4_list_type_1.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="GoToJsonschemaResponse200ArgsItemTypType4ListType1") + + +@attr.s(auto_attribs=True) +class GoToJsonschemaResponse200ArgsItemTypType4ListType1: + """ + Attributes: + str_ (Any): + """ + + str_: Any + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + str_ = self.str_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "str": str_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + str_ = d.pop("str") + + go_to_jsonschema_response_200_args_item_typ_type_4_list_type_1 = cls( + str_=str_, + ) + + go_to_jsonschema_response_200_args_item_typ_type_4_list_type_1.additional_properties = d + return go_to_jsonschema_response_200_args_item_typ_type_4_list_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/group.py b/python-client/windmill-api/windmill_api/models/group.py new file mode 100644 index 0000000000..e6a6029799 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/group.py @@ -0,0 +1,94 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.group_extra_perms import GroupExtraPerms +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Group") + + +@attr.s(auto_attribs=True) +class Group: + """ + Attributes: + name (str): + summary (Union[Unset, str]): + members (Union[Unset, List[str]]): + extra_perms (Union[Unset, GroupExtraPerms]): + """ + + name: str + summary: Union[Unset, str] = UNSET + members: Union[Unset, List[str]] = UNSET + extra_perms: Union[Unset, GroupExtraPerms] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + summary = self.summary + members: Union[Unset, List[str]] = UNSET + if not isinstance(self.members, Unset): + members = self.members + + extra_perms: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.extra_perms, Unset): + extra_perms = self.extra_perms.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if summary is not UNSET: + field_dict["summary"] = summary + if members is not UNSET: + field_dict["members"] = members + if extra_perms is not UNSET: + field_dict["extra_perms"] = extra_perms + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name") + + summary = d.pop("summary", UNSET) + + members = cast(List[str], d.pop("members", UNSET)) + + _extra_perms = d.pop("extra_perms", UNSET) + extra_perms: Union[Unset, GroupExtraPerms] + if isinstance(_extra_perms, Unset): + extra_perms = UNSET + else: + extra_perms = GroupExtraPerms.from_dict(_extra_perms) + + group = cls( + name=name, + summary=summary, + members=members, + extra_perms=extra_perms, + ) + + group.additional_properties = d + return group + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/group_extra_perms.py b/python-client/windmill-api/windmill_api/models/group_extra_perms.py new file mode 100644 index 0000000000..20f315f15c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/group_extra_perms.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="GroupExtraPerms") + + +@attr.s(auto_attribs=True) +class GroupExtraPerms: + """ """ + + additional_properties: Dict[str, bool] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + group_extra_perms = cls() + + group_extra_perms.additional_properties = d + return group_extra_perms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> bool: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: bool) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/input_transform_type_0.py b/python-client/windmill-api/windmill_api/models/input_transform_type_0.py new file mode 100644 index 0000000000..f91ebd428c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/input_transform_type_0.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.input_transform_type_0_type import InputTransformType0Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InputTransformType0") + + +@attr.s(auto_attribs=True) +class InputTransformType0: + """ + Attributes: + type (InputTransformType0Type): + value (Union[Unset, Any]): + """ + + type: InputTransformType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = InputTransformType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + input_transform_type_0 = cls( + type=type, + value=value, + ) + + input_transform_type_0.additional_properties = d + return input_transform_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/input_transform_type_0_type.py b/python-client/windmill-api/windmill_api/models/input_transform_type_0_type.py new file mode 100644 index 0000000000..49ce50d858 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/input_transform_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class InputTransformType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/input_transform_type_1.py b/python-client/windmill-api/windmill_api/models/input_transform_type_1.py new file mode 100644 index 0000000000..6e0bc9eee6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/input_transform_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.input_transform_type_1_type import InputTransformType1Type + +T = TypeVar("T", bound="InputTransformType1") + + +@attr.s(auto_attribs=True) +class InputTransformType1: + """ + Attributes: + expr (str): + type (InputTransformType1Type): + """ + + expr: str + type: InputTransformType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = InputTransformType1Type(d.pop("type")) + + input_transform_type_1 = cls( + expr=expr, + type=type, + ) + + input_transform_type_1.additional_properties = d + return input_transform_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/input_transform_type_1_type.py b/python-client/windmill-api/windmill_api/models/input_transform_type_1_type.py new file mode 100644 index 0000000000..a727d8ffe9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/input_transform_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class InputTransformType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/invite_user_json_body.py b/python-client/windmill-api/windmill_api/models/invite_user_json_body.py new file mode 100644 index 0000000000..314dd50929 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/invite_user_json_body.py @@ -0,0 +1,64 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="InviteUserJsonBody") + + +@attr.s(auto_attribs=True) +class InviteUserJsonBody: + """ + Attributes: + email (str): + is_admin (bool): + """ + + email: str + is_admin: bool + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + email = self.email + is_admin = self.is_admin + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "email": email, + "is_admin": is_admin, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + email = d.pop("email") + + is_admin = d.pop("is_admin") + + invite_user_json_body = cls( + email=email, + is_admin=is_admin, + ) + + invite_user_json_body.additional_properties = d + return invite_user_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/javascript_transform.py b/python-client/windmill-api/windmill_api/models/javascript_transform.py new file mode 100644 index 0000000000..ce3bb552a3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/javascript_transform.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.javascript_transform_type import JavascriptTransformType + +T = TypeVar("T", bound="JavascriptTransform") + + +@attr.s(auto_attribs=True) +class JavascriptTransform: + """ + Attributes: + expr (str): + type (JavascriptTransformType): + """ + + expr: str + type: JavascriptTransformType + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = JavascriptTransformType(d.pop("type")) + + javascript_transform = cls( + expr=expr, + type=type, + ) + + javascript_transform.additional_properties = d + return javascript_transform + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/javascript_transform_type.py b/python-client/windmill-api/windmill_api/models/javascript_transform_type.py new file mode 100644 index 0000000000..b154ceb301 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/javascript_transform_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class JavascriptTransformType(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/job.py b/python-client/windmill-api/windmill_api/models/job.py new file mode 100644 index 0000000000..e81f6f472e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/job.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.job_type import JobType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Job") + + +@attr.s(auto_attribs=True) +class Job: + """ + Attributes: + type (Union[Unset, JobType]): + """ + + type: Union[Unset, JobType] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, JobType] + if isinstance(_type, Unset): + type = UNSET + else: + type = JobType(_type) + + job = cls( + type=type, + ) + + job.additional_properties = d + return job + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/job_type.py b/python-client/windmill-api/windmill_api/models/job_type.py new file mode 100644 index 0000000000..b2554f59e4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/job_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class JobType(str, Enum): + COMPLETEDJOB = "CompletedJob" + QUEUEDJOB = "QueuedJob" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_audit_logs_action_kind.py b/python-client/windmill-api/windmill_api/models/list_audit_logs_action_kind.py new file mode 100644 index 0000000000..8120f4f12a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_audit_logs_action_kind.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class ListAuditLogsActionKind(str, Enum): + CREATE = "Create" + UPDATE = "Update" + DELETE = "Delete" + EXECUTE = "Execute" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_audit_logs_response_200_item.py b/python-client/windmill-api/windmill_api/models/list_audit_logs_response_200_item.py new file mode 100644 index 0000000000..c775e82edb --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_audit_logs_response_200_item.py @@ -0,0 +1,118 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.list_audit_logs_response_200_item_action_kind import ListAuditLogsResponse200ItemActionKind +from ..models.list_audit_logs_response_200_item_operation import ListAuditLogsResponse200ItemOperation +from ..models.list_audit_logs_response_200_item_parameters import ListAuditLogsResponse200ItemParameters +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListAuditLogsResponse200Item") + + +@attr.s(auto_attribs=True) +class ListAuditLogsResponse200Item: + """ + Attributes: + id (int): + timestamp (datetime.datetime): + username (str): + operation (ListAuditLogsResponse200ItemOperation): + action_kind (ListAuditLogsResponse200ItemActionKind): + resource (Union[Unset, str]): + parameters (Union[Unset, ListAuditLogsResponse200ItemParameters]): + """ + + id: int + timestamp: datetime.datetime + username: str + operation: ListAuditLogsResponse200ItemOperation + action_kind: ListAuditLogsResponse200ItemActionKind + resource: Union[Unset, str] = UNSET + parameters: Union[Unset, ListAuditLogsResponse200ItemParameters] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + timestamp = self.timestamp.isoformat() + + username = self.username + operation = self.operation.value + + action_kind = self.action_kind.value + + resource = self.resource + parameters: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.parameters, Unset): + parameters = self.parameters.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "timestamp": timestamp, + "username": username, + "operation": operation, + "action_kind": action_kind, + } + ) + if resource is not UNSET: + field_dict["resource"] = resource + if parameters is not UNSET: + field_dict["parameters"] = parameters + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id") + + timestamp = isoparse(d.pop("timestamp")) + + username = d.pop("username") + + operation = ListAuditLogsResponse200ItemOperation(d.pop("operation")) + + action_kind = ListAuditLogsResponse200ItemActionKind(d.pop("action_kind")) + + resource = d.pop("resource", UNSET) + + _parameters = d.pop("parameters", UNSET) + parameters: Union[Unset, ListAuditLogsResponse200ItemParameters] + if isinstance(_parameters, Unset): + parameters = UNSET + else: + parameters = ListAuditLogsResponse200ItemParameters.from_dict(_parameters) + + list_audit_logs_response_200_item = cls( + id=id, + timestamp=timestamp, + username=username, + operation=operation, + action_kind=action_kind, + resource=resource, + parameters=parameters, + ) + + list_audit_logs_response_200_item.additional_properties = d + return list_audit_logs_response_200_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_audit_logs_response_200_item_action_kind.py b/python-client/windmill-api/windmill_api/models/list_audit_logs_response_200_item_action_kind.py new file mode 100644 index 0000000000..717a3bf454 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_audit_logs_response_200_item_action_kind.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class ListAuditLogsResponse200ItemActionKind(str, Enum): + CREATED = "Created" + UPDATED = "Updated" + DELETE = "Delete" + EXECUTE = "Execute" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_audit_logs_response_200_item_operation.py b/python-client/windmill-api/windmill_api/models/list_audit_logs_response_200_item_operation.py new file mode 100644 index 0000000000..f3bdd90a2f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_audit_logs_response_200_item_operation.py @@ -0,0 +1,20 @@ +from enum import Enum + + +class ListAuditLogsResponse200ItemOperation(str, Enum): + JOBS_RUN = "jobs.run" + SCRIPTS_CREATE = "scripts.create" + SCRIPTS_UPDATE = "scripts.update" + USERS_CREATE = "users.create" + USERS_DELETE = "users.delete" + USERS_SETPASSWORD = "users.setpassword" + USERS_UPDATE = "users.update" + USERS_LOGIN = "users.login" + USERS_TOKEN_CREATE = "users.token.create" + USERS_TOKEN_DELETE = "users.token.delete" + VARIABLES_CREATE = "variables.create" + VARIABLES_DELETE = "variables.delete" + VARIABLES_UPDATE = "variables.update" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_audit_logs_response_200_item_parameters.py b/python-client/windmill-api/windmill_api/models/list_audit_logs_response_200_item_parameters.py new file mode 100644 index 0000000000..39659ff4ee --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_audit_logs_response_200_item_parameters.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ListAuditLogsResponse200ItemParameters") + + +@attr.s(auto_attribs=True) +class ListAuditLogsResponse200ItemParameters: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + list_audit_logs_response_200_item_parameters = cls() + + list_audit_logs_response_200_item_parameters.additional_properties = d + return list_audit_logs_response_200_item_parameters + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item.py new file mode 100644 index 0000000000..cb52767d40 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item.py @@ -0,0 +1,300 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.list_completed_jobs_response_200_item_args import ListCompletedJobsResponse200ItemArgs +from ..models.list_completed_jobs_response_200_item_flow_status import ListCompletedJobsResponse200ItemFlowStatus +from ..models.list_completed_jobs_response_200_item_job_kind import ListCompletedJobsResponse200ItemJobKind +from ..models.list_completed_jobs_response_200_item_language import ListCompletedJobsResponse200ItemLanguage +from ..models.list_completed_jobs_response_200_item_raw_flow import ListCompletedJobsResponse200ItemRawFlow +from ..models.list_completed_jobs_response_200_item_result import ListCompletedJobsResponse200ItemResult +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200Item") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200Item: + """ + Attributes: + id (str): + created_by (str): + created_at (datetime.datetime): + started_at (datetime.datetime): + duration_ms (int): + success (bool): + canceled (bool): + job_kind (ListCompletedJobsResponse200ItemJobKind): + permissioned_as (str): The user (u/userfoo) or group (g/groupfoo) whom + the execution of this script will be permissioned_as and by extension its DT_TOKEN. + is_flow_step (bool): + is_skipped (bool): + workspace_id (Union[Unset, str]): + parent_job (Union[Unset, str]): + script_path (Union[Unset, str]): + script_hash (Union[Unset, str]): + args (Union[Unset, ListCompletedJobsResponse200ItemArgs]): + result (Union[Unset, ListCompletedJobsResponse200ItemResult]): + logs (Union[Unset, str]): + deleted (Union[Unset, bool]): + raw_code (Union[Unset, str]): + canceled_by (Union[Unset, str]): + canceled_reason (Union[Unset, str]): + schedule_path (Union[Unset, str]): + flow_status (Union[Unset, ListCompletedJobsResponse200ItemFlowStatus]): + raw_flow (Union[Unset, ListCompletedJobsResponse200ItemRawFlow]): + language (Union[Unset, ListCompletedJobsResponse200ItemLanguage]): + """ + + id: str + created_by: str + created_at: datetime.datetime + started_at: datetime.datetime + duration_ms: int + success: bool + canceled: bool + job_kind: ListCompletedJobsResponse200ItemJobKind + permissioned_as: str + is_flow_step: bool + is_skipped: bool + workspace_id: Union[Unset, str] = UNSET + parent_job: Union[Unset, str] = UNSET + script_path: Union[Unset, str] = UNSET + script_hash: Union[Unset, str] = UNSET + args: Union[Unset, ListCompletedJobsResponse200ItemArgs] = UNSET + result: Union[Unset, ListCompletedJobsResponse200ItemResult] = UNSET + logs: Union[Unset, str] = UNSET + deleted: Union[Unset, bool] = UNSET + raw_code: Union[Unset, str] = UNSET + canceled_by: Union[Unset, str] = UNSET + canceled_reason: Union[Unset, str] = UNSET + schedule_path: Union[Unset, str] = UNSET + flow_status: Union[Unset, ListCompletedJobsResponse200ItemFlowStatus] = UNSET + raw_flow: Union[Unset, ListCompletedJobsResponse200ItemRawFlow] = UNSET + language: Union[Unset, ListCompletedJobsResponse200ItemLanguage] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + created_by = self.created_by + created_at = self.created_at.isoformat() + + started_at = self.started_at.isoformat() + + duration_ms = self.duration_ms + success = self.success + canceled = self.canceled + job_kind = self.job_kind.value + + permissioned_as = self.permissioned_as + is_flow_step = self.is_flow_step + is_skipped = self.is_skipped + workspace_id = self.workspace_id + parent_job = self.parent_job + script_path = self.script_path + script_hash = self.script_hash + args: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.args, Unset): + args = self.args.to_dict() + + result: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.result, Unset): + result = self.result.to_dict() + + logs = self.logs + deleted = self.deleted + raw_code = self.raw_code + canceled_by = self.canceled_by + canceled_reason = self.canceled_reason + schedule_path = self.schedule_path + flow_status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.flow_status, Unset): + flow_status = self.flow_status.to_dict() + + raw_flow: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.raw_flow, Unset): + raw_flow = self.raw_flow.to_dict() + + language: Union[Unset, str] = UNSET + if not isinstance(self.language, Unset): + language = self.language.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "created_by": created_by, + "created_at": created_at, + "started_at": started_at, + "duration_ms": duration_ms, + "success": success, + "canceled": canceled, + "job_kind": job_kind, + "permissioned_as": permissioned_as, + "is_flow_step": is_flow_step, + "is_skipped": is_skipped, + } + ) + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if parent_job is not UNSET: + field_dict["parent_job"] = parent_job + if script_path is not UNSET: + field_dict["script_path"] = script_path + if script_hash is not UNSET: + field_dict["script_hash"] = script_hash + if args is not UNSET: + field_dict["args"] = args + if result is not UNSET: + field_dict["result"] = result + if logs is not UNSET: + field_dict["logs"] = logs + if deleted is not UNSET: + field_dict["deleted"] = deleted + if raw_code is not UNSET: + field_dict["raw_code"] = raw_code + if canceled_by is not UNSET: + field_dict["canceled_by"] = canceled_by + if canceled_reason is not UNSET: + field_dict["canceled_reason"] = canceled_reason + if schedule_path is not UNSET: + field_dict["schedule_path"] = schedule_path + if flow_status is not UNSET: + field_dict["flow_status"] = flow_status + if raw_flow is not UNSET: + field_dict["raw_flow"] = raw_flow + if language is not UNSET: + field_dict["language"] = language + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id") + + created_by = d.pop("created_by") + + created_at = isoparse(d.pop("created_at")) + + started_at = isoparse(d.pop("started_at")) + + duration_ms = d.pop("duration_ms") + + success = d.pop("success") + + canceled = d.pop("canceled") + + job_kind = ListCompletedJobsResponse200ItemJobKind(d.pop("job_kind")) + + permissioned_as = d.pop("permissioned_as") + + is_flow_step = d.pop("is_flow_step") + + is_skipped = d.pop("is_skipped") + + workspace_id = d.pop("workspace_id", UNSET) + + parent_job = d.pop("parent_job", UNSET) + + script_path = d.pop("script_path", UNSET) + + script_hash = d.pop("script_hash", UNSET) + + _args = d.pop("args", UNSET) + args: Union[Unset, ListCompletedJobsResponse200ItemArgs] + if isinstance(_args, Unset): + args = UNSET + else: + args = ListCompletedJobsResponse200ItemArgs.from_dict(_args) + + _result = d.pop("result", UNSET) + result: Union[Unset, ListCompletedJobsResponse200ItemResult] + if isinstance(_result, Unset): + result = UNSET + else: + result = ListCompletedJobsResponse200ItemResult.from_dict(_result) + + logs = d.pop("logs", UNSET) + + deleted = d.pop("deleted", UNSET) + + raw_code = d.pop("raw_code", UNSET) + + canceled_by = d.pop("canceled_by", UNSET) + + canceled_reason = d.pop("canceled_reason", UNSET) + + schedule_path = d.pop("schedule_path", UNSET) + + _flow_status = d.pop("flow_status", UNSET) + flow_status: Union[Unset, ListCompletedJobsResponse200ItemFlowStatus] + if isinstance(_flow_status, Unset): + flow_status = UNSET + else: + flow_status = ListCompletedJobsResponse200ItemFlowStatus.from_dict(_flow_status) + + _raw_flow = d.pop("raw_flow", UNSET) + raw_flow: Union[Unset, ListCompletedJobsResponse200ItemRawFlow] + if isinstance(_raw_flow, Unset): + raw_flow = UNSET + else: + raw_flow = ListCompletedJobsResponse200ItemRawFlow.from_dict(_raw_flow) + + _language = d.pop("language", UNSET) + language: Union[Unset, ListCompletedJobsResponse200ItemLanguage] + if isinstance(_language, Unset): + language = UNSET + else: + language = ListCompletedJobsResponse200ItemLanguage(_language) + + list_completed_jobs_response_200_item = cls( + id=id, + created_by=created_by, + created_at=created_at, + started_at=started_at, + duration_ms=duration_ms, + success=success, + canceled=canceled, + job_kind=job_kind, + permissioned_as=permissioned_as, + is_flow_step=is_flow_step, + is_skipped=is_skipped, + workspace_id=workspace_id, + parent_job=parent_job, + script_path=script_path, + script_hash=script_hash, + args=args, + result=result, + logs=logs, + deleted=deleted, + raw_code=raw_code, + canceled_by=canceled_by, + canceled_reason=canceled_reason, + schedule_path=schedule_path, + flow_status=flow_status, + raw_flow=raw_flow, + language=language, + ) + + list_completed_jobs_response_200_item.additional_properties = d + return list_completed_jobs_response_200_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_args.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_args.py new file mode 100644 index 0000000000..5f0f52a11e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_args.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemArgs") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemArgs: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + list_completed_jobs_response_200_item_args = cls() + + list_completed_jobs_response_200_item_args.additional_properties = d + return list_completed_jobs_response_200_item_args + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status.py new file mode 100644 index 0000000000..3c9637b920 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status.py @@ -0,0 +1,108 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_completed_jobs_response_200_item_flow_status_failure_module import ( + ListCompletedJobsResponse200ItemFlowStatusFailureModule, +) +from ..models.list_completed_jobs_response_200_item_flow_status_modules_item import ( + ListCompletedJobsResponse200ItemFlowStatusModulesItem, +) +from ..models.list_completed_jobs_response_200_item_flow_status_retry import ( + ListCompletedJobsResponse200ItemFlowStatusRetry, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemFlowStatus") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemFlowStatus: + """ + Attributes: + step (int): + modules (List[ListCompletedJobsResponse200ItemFlowStatusModulesItem]): + failure_module (ListCompletedJobsResponse200ItemFlowStatusFailureModule): + retry (Union[Unset, ListCompletedJobsResponse200ItemFlowStatusRetry]): + """ + + step: int + modules: List[ListCompletedJobsResponse200ItemFlowStatusModulesItem] + failure_module: ListCompletedJobsResponse200ItemFlowStatusFailureModule + retry: Union[Unset, ListCompletedJobsResponse200ItemFlowStatusRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + step = self.step + modules = [] + for modules_item_data in self.modules: + modules_item = modules_item_data.to_dict() + + modules.append(modules_item) + + failure_module = self.failure_module.to_dict() + + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "step": step, + "modules": modules, + "failure_module": failure_module, + } + ) + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + step = d.pop("step") + + modules = [] + _modules = d.pop("modules") + for modules_item_data in _modules: + modules_item = ListCompletedJobsResponse200ItemFlowStatusModulesItem.from_dict(modules_item_data) + + modules.append(modules_item) + + failure_module = ListCompletedJobsResponse200ItemFlowStatusFailureModule.from_dict(d.pop("failure_module")) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, ListCompletedJobsResponse200ItemFlowStatusRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = ListCompletedJobsResponse200ItemFlowStatusRetry.from_dict(_retry) + + list_completed_jobs_response_200_item_flow_status = cls( + step=step, + modules=modules, + failure_module=failure_module, + retry=retry, + ) + + list_completed_jobs_response_200_item_flow_status.additional_properties = d + return list_completed_jobs_response_200_item_flow_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_failure_module.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_failure_module.py new file mode 100644 index 0000000000..18740db19b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_failure_module.py @@ -0,0 +1,108 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.list_completed_jobs_response_200_item_flow_status_failure_module_iterator import ( + ListCompletedJobsResponse200ItemFlowStatusFailureModuleIterator, +) +from ..models.list_completed_jobs_response_200_item_flow_status_failure_module_type import ( + ListCompletedJobsResponse200ItemFlowStatusFailureModuleType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemFlowStatusFailureModule") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemFlowStatusFailureModule: + """ + Attributes: + type (ListCompletedJobsResponse200ItemFlowStatusFailureModuleType): + job (Union[Unset, str]): + count (Union[Unset, int]): + iterator (Union[Unset, ListCompletedJobsResponse200ItemFlowStatusFailureModuleIterator]): + forloop_jobs (Union[Unset, List[str]]): + """ + + type: ListCompletedJobsResponse200ItemFlowStatusFailureModuleType + job: Union[Unset, str] = UNSET + count: Union[Unset, int] = UNSET + iterator: Union[Unset, ListCompletedJobsResponse200ItemFlowStatusFailureModuleIterator] = UNSET + forloop_jobs: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + job = self.job + count = self.count + iterator: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.iterator, Unset): + iterator = self.iterator.to_dict() + + forloop_jobs: Union[Unset, List[str]] = UNSET + if not isinstance(self.forloop_jobs, Unset): + forloop_jobs = self.forloop_jobs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if job is not UNSET: + field_dict["job"] = job + if count is not UNSET: + field_dict["count"] = count + if iterator is not UNSET: + field_dict["iterator"] = iterator + if forloop_jobs is not UNSET: + field_dict["forloop_jobs"] = forloop_jobs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListCompletedJobsResponse200ItemFlowStatusFailureModuleType(d.pop("type")) + + job = d.pop("job", UNSET) + + count = d.pop("count", UNSET) + + _iterator = d.pop("iterator", UNSET) + iterator: Union[Unset, ListCompletedJobsResponse200ItemFlowStatusFailureModuleIterator] + if isinstance(_iterator, Unset): + iterator = UNSET + else: + iterator = ListCompletedJobsResponse200ItemFlowStatusFailureModuleIterator.from_dict(_iterator) + + forloop_jobs = cast(List[str], d.pop("forloop_jobs", UNSET)) + + list_completed_jobs_response_200_item_flow_status_failure_module = cls( + type=type, + job=job, + count=count, + iterator=iterator, + forloop_jobs=forloop_jobs, + ) + + list_completed_jobs_response_200_item_flow_status_failure_module.additional_properties = d + return list_completed_jobs_response_200_item_flow_status_failure_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_failure_module_iterator.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_failure_module_iterator.py new file mode 100644 index 0000000000..8d8b0dd338 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_failure_module_iterator.py @@ -0,0 +1,76 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemFlowStatusFailureModuleIterator") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemFlowStatusFailureModuleIterator: + """ + Attributes: + index (Union[Unset, int]): + itered (Union[Unset, List[Any]]): + args (Union[Unset, Any]): + """ + + index: Union[Unset, int] = UNSET + itered: Union[Unset, List[Any]] = UNSET + args: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + index = self.index + itered: Union[Unset, List[Any]] = UNSET + if not isinstance(self.itered, Unset): + itered = self.itered + + args = self.args + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if index is not UNSET: + field_dict["index"] = index + if itered is not UNSET: + field_dict["itered"] = itered + if args is not UNSET: + field_dict["args"] = args + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + index = d.pop("index", UNSET) + + itered = cast(List[Any], d.pop("itered", UNSET)) + + args = d.pop("args", UNSET) + + list_completed_jobs_response_200_item_flow_status_failure_module_iterator = cls( + index=index, + itered=itered, + args=args, + ) + + list_completed_jobs_response_200_item_flow_status_failure_module_iterator.additional_properties = d + return list_completed_jobs_response_200_item_flow_status_failure_module_iterator + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_failure_module_type.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_failure_module_type.py new file mode 100644 index 0000000000..c8e2f6e14f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_failure_module_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemFlowStatusFailureModuleType(str, Enum): + WAITINGFORPRIORSTEPS = "WaitingForPriorSteps" + WAITINGFOREVENT = "WaitingForEvent" + WAITINGFOREXECUTOR = "WaitingForExecutor" + INPROGRESS = "InProgress" + SUCCESS = "Success" + FAILURE = "Failure" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_modules_item.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_modules_item.py new file mode 100644 index 0000000000..1e740d3534 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_modules_item.py @@ -0,0 +1,108 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.list_completed_jobs_response_200_item_flow_status_modules_item_iterator import ( + ListCompletedJobsResponse200ItemFlowStatusModulesItemIterator, +) +from ..models.list_completed_jobs_response_200_item_flow_status_modules_item_type import ( + ListCompletedJobsResponse200ItemFlowStatusModulesItemType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemFlowStatusModulesItem") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemFlowStatusModulesItem: + """ + Attributes: + type (ListCompletedJobsResponse200ItemFlowStatusModulesItemType): + job (Union[Unset, str]): + count (Union[Unset, int]): + iterator (Union[Unset, ListCompletedJobsResponse200ItemFlowStatusModulesItemIterator]): + forloop_jobs (Union[Unset, List[str]]): + """ + + type: ListCompletedJobsResponse200ItemFlowStatusModulesItemType + job: Union[Unset, str] = UNSET + count: Union[Unset, int] = UNSET + iterator: Union[Unset, ListCompletedJobsResponse200ItemFlowStatusModulesItemIterator] = UNSET + forloop_jobs: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + job = self.job + count = self.count + iterator: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.iterator, Unset): + iterator = self.iterator.to_dict() + + forloop_jobs: Union[Unset, List[str]] = UNSET + if not isinstance(self.forloop_jobs, Unset): + forloop_jobs = self.forloop_jobs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if job is not UNSET: + field_dict["job"] = job + if count is not UNSET: + field_dict["count"] = count + if iterator is not UNSET: + field_dict["iterator"] = iterator + if forloop_jobs is not UNSET: + field_dict["forloop_jobs"] = forloop_jobs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListCompletedJobsResponse200ItemFlowStatusModulesItemType(d.pop("type")) + + job = d.pop("job", UNSET) + + count = d.pop("count", UNSET) + + _iterator = d.pop("iterator", UNSET) + iterator: Union[Unset, ListCompletedJobsResponse200ItemFlowStatusModulesItemIterator] + if isinstance(_iterator, Unset): + iterator = UNSET + else: + iterator = ListCompletedJobsResponse200ItemFlowStatusModulesItemIterator.from_dict(_iterator) + + forloop_jobs = cast(List[str], d.pop("forloop_jobs", UNSET)) + + list_completed_jobs_response_200_item_flow_status_modules_item = cls( + type=type, + job=job, + count=count, + iterator=iterator, + forloop_jobs=forloop_jobs, + ) + + list_completed_jobs_response_200_item_flow_status_modules_item.additional_properties = d + return list_completed_jobs_response_200_item_flow_status_modules_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_modules_item_iterator.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_modules_item_iterator.py new file mode 100644 index 0000000000..754abf6e66 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_modules_item_iterator.py @@ -0,0 +1,76 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemFlowStatusModulesItemIterator") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemFlowStatusModulesItemIterator: + """ + Attributes: + index (Union[Unset, int]): + itered (Union[Unset, List[Any]]): + args (Union[Unset, Any]): + """ + + index: Union[Unset, int] = UNSET + itered: Union[Unset, List[Any]] = UNSET + args: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + index = self.index + itered: Union[Unset, List[Any]] = UNSET + if not isinstance(self.itered, Unset): + itered = self.itered + + args = self.args + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if index is not UNSET: + field_dict["index"] = index + if itered is not UNSET: + field_dict["itered"] = itered + if args is not UNSET: + field_dict["args"] = args + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + index = d.pop("index", UNSET) + + itered = cast(List[Any], d.pop("itered", UNSET)) + + args = d.pop("args", UNSET) + + list_completed_jobs_response_200_item_flow_status_modules_item_iterator = cls( + index=index, + itered=itered, + args=args, + ) + + list_completed_jobs_response_200_item_flow_status_modules_item_iterator.additional_properties = d + return list_completed_jobs_response_200_item_flow_status_modules_item_iterator + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_modules_item_type.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_modules_item_type.py new file mode 100644 index 0000000000..de2774400c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_modules_item_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemFlowStatusModulesItemType(str, Enum): + WAITINGFORPRIORSTEPS = "WaitingForPriorSteps" + WAITINGFOREVENT = "WaitingForEvent" + WAITINGFOREXECUTOR = "WaitingForExecutor" + INPROGRESS = "InProgress" + SUCCESS = "Success" + FAILURE = "Failure" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_retry.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_retry.py new file mode 100644 index 0000000000..aff7fd47c6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_flow_status_retry.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemFlowStatusRetry") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemFlowStatusRetry: + """ + Attributes: + fail_count (Union[Unset, int]): + """ + + fail_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + fail_count = self.fail_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if fail_count is not UNSET: + field_dict["fail_count"] = fail_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + fail_count = d.pop("fail_count", UNSET) + + list_completed_jobs_response_200_item_flow_status_retry = cls( + fail_count=fail_count, + ) + + list_completed_jobs_response_200_item_flow_status_retry.additional_properties = d + return list_completed_jobs_response_200_item_flow_status_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_job_kind.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_job_kind.py new file mode 100644 index 0000000000..36c9db2ae0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_job_kind.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemJobKind(str, Enum): + SCRIPT = "script" + PREVIEW = "preview" + DEPENDENCIES = "dependencies" + FLOW = "flow" + FLOWPREVIEW = "flowpreview" + SCRIPT_HUB = "script_hub" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_language.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_language.py new file mode 100644 index 0000000000..a72d934a2f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemLanguage(str, Enum): + PYTHON3 = "python3" + DENO = "deno" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow.py new file mode 100644 index 0000000000..61621f027e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow.py @@ -0,0 +1,99 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module import ( + ListCompletedJobsResponse200ItemRawFlowFailureModule, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item import ( + ListCompletedJobsResponse200ItemRawFlowModulesItem, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlow") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlow: + """ + Attributes: + modules (List[ListCompletedJobsResponse200ItemRawFlowModulesItem]): + failure_module (Union[Unset, ListCompletedJobsResponse200ItemRawFlowFailureModule]): + same_worker (Union[Unset, bool]): + """ + + modules: List[ListCompletedJobsResponse200ItemRawFlowModulesItem] + failure_module: Union[Unset, ListCompletedJobsResponse200ItemRawFlowFailureModule] = UNSET + same_worker: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + modules = [] + for modules_item_data in self.modules: + modules_item = modules_item_data.to_dict() + + modules.append(modules_item) + + failure_module: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.failure_module, Unset): + failure_module = self.failure_module.to_dict() + + same_worker = self.same_worker + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "modules": modules, + } + ) + if failure_module is not UNSET: + field_dict["failure_module"] = failure_module + if same_worker is not UNSET: + field_dict["same_worker"] = same_worker + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + modules = [] + _modules = d.pop("modules") + for modules_item_data in _modules: + modules_item = ListCompletedJobsResponse200ItemRawFlowModulesItem.from_dict(modules_item_data) + + modules.append(modules_item) + + _failure_module = d.pop("failure_module", UNSET) + failure_module: Union[Unset, ListCompletedJobsResponse200ItemRawFlowFailureModule] + if isinstance(_failure_module, Unset): + failure_module = UNSET + else: + failure_module = ListCompletedJobsResponse200ItemRawFlowFailureModule.from_dict(_failure_module) + + same_worker = d.pop("same_worker", UNSET) + + list_completed_jobs_response_200_item_raw_flow = cls( + modules=modules, + failure_module=failure_module, + same_worker=same_worker, + ) + + list_completed_jobs_response_200_item_raw_flow.additional_properties = d + return list_completed_jobs_response_200_item_raw_flow + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module.py new file mode 100644 index 0000000000..03fff1fe1f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module.py @@ -0,0 +1,261 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransforms, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_retry import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleRetry, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_0 import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType0, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_1 import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType1, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_stop_after_if import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleStopAfterIf, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_0 import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType0, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_1 import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType1, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2 import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_3 import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType3, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowFailureModule") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowFailureModule: + """ + Attributes: + input_transforms (ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransforms): + value (Union[ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType0, + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType1, + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2, + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType3]): + stop_after_if (Union[Unset, ListCompletedJobsResponse200ItemRawFlowFailureModuleStopAfterIf]): + sleep (Union[ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType0, + ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, ListCompletedJobsResponse200ItemRawFlowFailureModuleRetry]): + """ + + input_transforms: ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransforms + value: Union[ + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType0, + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType1, + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2, + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType3, + ] + stop_after_if: Union[Unset, ListCompletedJobsResponse200ItemRawFlowFailureModuleStopAfterIf] = UNSET + sleep: Union[ + ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType0, + ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType1, + Unset, + ] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, ListCompletedJobsResponse200ItemRawFlowFailureModuleRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransforms.from_dict( + d.pop("input_transforms") + ) + + def _parse_value( + data: object, + ) -> Union[ + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType0, + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType1, + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2, + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, ListCompletedJobsResponse200ItemRawFlowFailureModuleStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = ListCompletedJobsResponse200ItemRawFlowFailureModuleStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[ + ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType0, + ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType1, + Unset, + ]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType0.from_dict( + _sleep_type_0 + ) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, ListCompletedJobsResponse200ItemRawFlowFailureModuleRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = ListCompletedJobsResponse200ItemRawFlowFailureModuleRetry.from_dict(_retry) + + list_completed_jobs_response_200_item_raw_flow_failure_module = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + list_completed_jobs_response_200_item_raw_flow_failure_module.additional_properties = d + return list_completed_jobs_response_200_item_raw_flow_failure_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms.py new file mode 100644 index 0000000000..e1d0ccea47 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms.py @@ -0,0 +1,111 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0 import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1 import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransforms") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0, + ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance( + prop, ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0 + ): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0, + ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0.from_dict( + data + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1.from_dict( + data + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms.additional_properties = ( + additional_properties + ) + return list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0, + ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0, + ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..3402aad2fa --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0.py @@ -0,0 +1,75 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0_type import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type( + d.pop("type") + ) + + value = d.pop("value", UNSET) + + list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0.additional_properties = ( + d + ) + return list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..65a9ca4ae6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..ee547ff8cd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1.py @@ -0,0 +1,72 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1_type import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type( + d.pop("type") + ) + + list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1.additional_properties = ( + d + ) + return list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..e3bcf76638 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_retry.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_retry.py new file mode 100644 index 0000000000..faa5a7ba0f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_retry.py @@ -0,0 +1,86 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_retry_constant import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleRetryConstant, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_retry_exponential import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleRetryExponential, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowFailureModuleRetry") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowFailureModuleRetry: + """ + Attributes: + constant (Union[Unset, ListCompletedJobsResponse200ItemRawFlowFailureModuleRetryConstant]): + exponential (Union[Unset, ListCompletedJobsResponse200ItemRawFlowFailureModuleRetryExponential]): + """ + + constant: Union[Unset, ListCompletedJobsResponse200ItemRawFlowFailureModuleRetryConstant] = UNSET + exponential: Union[Unset, ListCompletedJobsResponse200ItemRawFlowFailureModuleRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, ListCompletedJobsResponse200ItemRawFlowFailureModuleRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = ListCompletedJobsResponse200ItemRawFlowFailureModuleRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, ListCompletedJobsResponse200ItemRawFlowFailureModuleRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = ListCompletedJobsResponse200ItemRawFlowFailureModuleRetryExponential.from_dict(_exponential) + + list_completed_jobs_response_200_item_raw_flow_failure_module_retry = cls( + constant=constant, + exponential=exponential, + ) + + list_completed_jobs_response_200_item_raw_flow_failure_module_retry.additional_properties = d + return list_completed_jobs_response_200_item_raw_flow_failure_module_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_retry_constant.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_retry_constant.py new file mode 100644 index 0000000000..fc13576bc5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowFailureModuleRetryConstant") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowFailureModuleRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + list_completed_jobs_response_200_item_raw_flow_failure_module_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + list_completed_jobs_response_200_item_raw_flow_failure_module_retry_constant.additional_properties = d + return list_completed_jobs_response_200_item_raw_flow_failure_module_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_retry_exponential.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_retry_exponential.py new file mode 100644 index 0000000000..4118828b79 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowFailureModuleRetryExponential") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowFailureModuleRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + list_completed_jobs_response_200_item_raw_flow_failure_module_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + list_completed_jobs_response_200_item_raw_flow_failure_module_retry_exponential.additional_properties = d + return list_completed_jobs_response_200_item_raw_flow_failure_module_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_0.py new file mode 100644 index 0000000000..cd867acea9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_0_type import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType0") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType0: + """ + Attributes: + type (ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType0Type): + value (Union[Unset, Any]): + """ + + type: ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_0 = cls( + type=type, + value=value, + ) + + list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_0.additional_properties = d + return list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_0_type.py new file mode 100644 index 0000000000..9f553b660f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_1.py new file mode 100644 index 0000000000..dab34f07bb --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_1_type import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType1Type, +) + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType1") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType1: + """ + Attributes: + expr (str): + type (ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType1Type): + """ + + expr: str + type: ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType1Type(d.pop("type")) + + list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_1.additional_properties = d + return list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_1_type.py new file mode 100644 index 0000000000..12501d1e70 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemRawFlowFailureModuleSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_stop_after_if.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_stop_after_if.py new file mode 100644 index 0000000000..71dea514df --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowFailureModuleStopAfterIf") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowFailureModuleStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + list_completed_jobs_response_200_item_raw_flow_failure_module_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + list_completed_jobs_response_200_item_raw_flow_failure_module_stop_after_if.additional_properties = d + return list_completed_jobs_response_200_item_raw_flow_failure_module_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_0.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_0.py new file mode 100644 index 0000000000..c1be2ed6bb --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_0_language import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType0") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType0: + """ + Attributes: + content (str): + language (ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_0.additional_properties = d + return list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_0_language.py new file mode 100644 index 0000000000..ea41711ef7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_1.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_1.py new file mode 100644 index 0000000000..25a58ba4e6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_1_type import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType1Type, +) + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType1") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType1: + """ + Attributes: + path (str): + type (ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType1Type): + """ + + path: str + type: ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType1Type(d.pop("type")) + + list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_1 = cls( + path=path, + type=type, + ) + + list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_1.additional_properties = d + return list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_1_type.py new file mode 100644 index 0000000000..c63ca944d0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2.py new file mode 100644 index 0000000000..8cbfdb249c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2.py @@ -0,0 +1,116 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0 import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType0, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1 import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType1, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_type import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2Type, +) + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2: + """ + Attributes: + iterator (Union[ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType0, + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType1]): + skip_failures (bool): + type (ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2Type): + """ + + iterator: Union[ + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType0, + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType1, + ] + skip_failures: bool + type: ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType0, + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType0.from_dict( + data + ) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType1.from_dict( + data + ) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2Type(d.pop("type")) + + list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2.additional_properties = d + return list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..6325f83e1c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0_type import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType0: + """ + Attributes: + type (ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0.additional_properties = ( + d + ) + return list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..2032c3f140 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..075f48c46c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1_type import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType1: + """ + Attributes: + expr (str): + type (ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType1Type): + """ + + expr: str + type: ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType1Type(d.pop("type")) + + list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1.additional_properties = ( + d + ) + return list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..4311d260e5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_type.py new file mode 100644 index 0000000000..77cd4e39e7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_3.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_3.py new file mode 100644 index 0000000000..3b210dcd4c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_3.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_3_type import ( + ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType3Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType3") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType3: + """ + Attributes: + type (ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType3Type): + path (Union[Unset, str]): + """ + + type: ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_3 = cls( + type=type, + path=path, + ) + + list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_3.additional_properties = d + return list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_3_type.py new file mode 100644 index 0000000000..ac7704a800 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_failure_module_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemRawFlowFailureModuleValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item.py new file mode 100644 index 0000000000..72a22d18f4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item.py @@ -0,0 +1,259 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransforms, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_retry import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemRetry, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_0 import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType0, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_1 import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType1, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_stop_after_if import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemStopAfterIf, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_0 import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType0, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_1 import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType1, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2 import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_3 import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType3, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowModulesItem") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowModulesItem: + """ + Attributes: + input_transforms (ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransforms): + value (Union[ListCompletedJobsResponse200ItemRawFlowModulesItemValueType0, + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType1, + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2, + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType3]): + stop_after_if (Union[Unset, ListCompletedJobsResponse200ItemRawFlowModulesItemStopAfterIf]): + sleep (Union[ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType0, + ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, ListCompletedJobsResponse200ItemRawFlowModulesItemRetry]): + """ + + input_transforms: ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransforms + value: Union[ + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType0, + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType1, + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2, + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType3, + ] + stop_after_if: Union[Unset, ListCompletedJobsResponse200ItemRawFlowModulesItemStopAfterIf] = UNSET + sleep: Union[ + ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType0, + ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType1, + Unset, + ] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, ListCompletedJobsResponse200ItemRawFlowModulesItemRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, ListCompletedJobsResponse200ItemRawFlowModulesItemValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, ListCompletedJobsResponse200ItemRawFlowModulesItemValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransforms.from_dict( + d.pop("input_transforms") + ) + + def _parse_value( + data: object, + ) -> Union[ + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType0, + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType1, + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2, + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = ListCompletedJobsResponse200ItemRawFlowModulesItemValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = ListCompletedJobsResponse200ItemRawFlowModulesItemValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = ListCompletedJobsResponse200ItemRawFlowModulesItemValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, ListCompletedJobsResponse200ItemRawFlowModulesItemStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = ListCompletedJobsResponse200ItemRawFlowModulesItemStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[ + ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType0, + ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType1, + Unset, + ]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, ListCompletedJobsResponse200ItemRawFlowModulesItemRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = ListCompletedJobsResponse200ItemRawFlowModulesItemRetry.from_dict(_retry) + + list_completed_jobs_response_200_item_raw_flow_modules_item = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + list_completed_jobs_response_200_item_raw_flow_modules_item.additional_properties = d + return list_completed_jobs_response_200_item_raw_flow_modules_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms.py new file mode 100644 index 0000000000..f13df5d899 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms.py @@ -0,0 +1,113 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0 import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1 import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransforms") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0, + ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance( + prop, ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0 + ): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0, + ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0.from_dict( + data + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1.from_dict( + data + ) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms.additional_properties = ( + additional_properties + ) + return list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0, + ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0, + ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..adeb719a42 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0.py @@ -0,0 +1,75 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0_type import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0Type( + d.pop("type") + ) + + value = d.pop("value", UNSET) + + list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0.additional_properties = ( + d + ) + return list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..6dfab5cbc7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..003c5d4d3a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1.py @@ -0,0 +1,72 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1_type import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1Type( + d.pop("type") + ) + + list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1.additional_properties = ( + d + ) + return list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..4314523b4f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_retry.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_retry.py new file mode 100644 index 0000000000..429c7b60a7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_retry.py @@ -0,0 +1,86 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_retry_constant import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemRetryConstant, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_retry_exponential import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemRetryExponential, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowModulesItemRetry") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowModulesItemRetry: + """ + Attributes: + constant (Union[Unset, ListCompletedJobsResponse200ItemRawFlowModulesItemRetryConstant]): + exponential (Union[Unset, ListCompletedJobsResponse200ItemRawFlowModulesItemRetryExponential]): + """ + + constant: Union[Unset, ListCompletedJobsResponse200ItemRawFlowModulesItemRetryConstant] = UNSET + exponential: Union[Unset, ListCompletedJobsResponse200ItemRawFlowModulesItemRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, ListCompletedJobsResponse200ItemRawFlowModulesItemRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = ListCompletedJobsResponse200ItemRawFlowModulesItemRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, ListCompletedJobsResponse200ItemRawFlowModulesItemRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = ListCompletedJobsResponse200ItemRawFlowModulesItemRetryExponential.from_dict(_exponential) + + list_completed_jobs_response_200_item_raw_flow_modules_item_retry = cls( + constant=constant, + exponential=exponential, + ) + + list_completed_jobs_response_200_item_raw_flow_modules_item_retry.additional_properties = d + return list_completed_jobs_response_200_item_raw_flow_modules_item_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_retry_constant.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_retry_constant.py new file mode 100644 index 0000000000..f6be7d45b3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowModulesItemRetryConstant") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowModulesItemRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + list_completed_jobs_response_200_item_raw_flow_modules_item_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + list_completed_jobs_response_200_item_raw_flow_modules_item_retry_constant.additional_properties = d + return list_completed_jobs_response_200_item_raw_flow_modules_item_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_retry_exponential.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_retry_exponential.py new file mode 100644 index 0000000000..d5fc933fb8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowModulesItemRetryExponential") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowModulesItemRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + list_completed_jobs_response_200_item_raw_flow_modules_item_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + list_completed_jobs_response_200_item_raw_flow_modules_item_retry_exponential.additional_properties = d + return list_completed_jobs_response_200_item_raw_flow_modules_item_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_0.py new file mode 100644 index 0000000000..148ace18ca --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_0_type import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType0") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType0: + """ + Attributes: + type (ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType0Type): + value (Union[Unset, Any]): + """ + + type: ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_0 = cls( + type=type, + value=value, + ) + + list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_0.additional_properties = d + return list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_0_type.py new file mode 100644 index 0000000000..9d7bbd0b2f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_1.py new file mode 100644 index 0000000000..5a276391d7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_1_type import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType1Type, +) + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType1") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType1: + """ + Attributes: + expr (str): + type (ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType1Type): + """ + + expr: str + type: ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType1Type(d.pop("type")) + + list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_1.additional_properties = d + return list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_1_type.py new file mode 100644 index 0000000000..ec515139ec --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemRawFlowModulesItemSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_stop_after_if.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_stop_after_if.py new file mode 100644 index 0000000000..246348d5f1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowModulesItemStopAfterIf") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowModulesItemStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + list_completed_jobs_response_200_item_raw_flow_modules_item_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + list_completed_jobs_response_200_item_raw_flow_modules_item_stop_after_if.additional_properties = d + return list_completed_jobs_response_200_item_raw_flow_modules_item_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_0.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_0.py new file mode 100644 index 0000000000..2177d7933d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_0_language import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowModulesItemValueType0") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowModulesItemValueType0: + """ + Attributes: + content (str): + language (ListCompletedJobsResponse200ItemRawFlowModulesItemValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: ListCompletedJobsResponse200ItemRawFlowModulesItemValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = ListCompletedJobsResponse200ItemRawFlowModulesItemValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_0.additional_properties = d + return list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_0_language.py new file mode 100644 index 0000000000..11bcf0c603 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemRawFlowModulesItemValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_1.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_1.py new file mode 100644 index 0000000000..46d424cd1f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_1_type import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType1Type, +) + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowModulesItemValueType1") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowModulesItemValueType1: + """ + Attributes: + path (str): + type (ListCompletedJobsResponse200ItemRawFlowModulesItemValueType1Type): + """ + + path: str + type: ListCompletedJobsResponse200ItemRawFlowModulesItemValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = ListCompletedJobsResponse200ItemRawFlowModulesItemValueType1Type(d.pop("type")) + + list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_1 = cls( + path=path, + type=type, + ) + + list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_1.additional_properties = d + return list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_1_type.py new file mode 100644 index 0000000000..ae65bd26b9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemRawFlowModulesItemValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2.py new file mode 100644 index 0000000000..b9cbebf908 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2.py @@ -0,0 +1,114 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0 import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType0, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1 import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType1, +) +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_type import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2Type, +) + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2: + """ + Attributes: + iterator (Union[ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType0, + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType1]): + skip_failures (bool): + type (ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2Type): + """ + + iterator: Union[ + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType0, + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType1, + ] + skip_failures: bool + type: ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType0, + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType0.from_dict( + data + ) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2Type(d.pop("type")) + + list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2.additional_properties = d + return list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..a93b8407b3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0_type import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType0: + """ + Attributes: + type (ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0.additional_properties = ( + d + ) + return list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..3058823eaa --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..5f4c9aa3b7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1_type import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType1: + """ + Attributes: + expr (str): + type (ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType1Type): + """ + + expr: str + type: ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType1Type(d.pop("type")) + + list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1.additional_properties = ( + d + ) + return list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..57e85cf422 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_type.py new file mode 100644 index 0000000000..bb7b9e9cfe --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemRawFlowModulesItemValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_3.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_3.py new file mode 100644 index 0000000000..672f527980 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_3.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_3_type import ( + ListCompletedJobsResponse200ItemRawFlowModulesItemValueType3Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemRawFlowModulesItemValueType3") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemRawFlowModulesItemValueType3: + """ + Attributes: + type (ListCompletedJobsResponse200ItemRawFlowModulesItemValueType3Type): + path (Union[Unset, str]): + """ + + type: ListCompletedJobsResponse200ItemRawFlowModulesItemValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListCompletedJobsResponse200ItemRawFlowModulesItemValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_3 = cls( + type=type, + path=path, + ) + + list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_3.additional_properties = d + return list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_3_type.py new file mode 100644 index 0000000000..a06956fa6e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_raw_flow_modules_item_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListCompletedJobsResponse200ItemRawFlowModulesItemValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_result.py b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_result.py new file mode 100644 index 0000000000..3fa6cdcab6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_completed_jobs_response_200_item_result.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ListCompletedJobsResponse200ItemResult") + + +@attr.s(auto_attribs=True) +class ListCompletedJobsResponse200ItemResult: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + list_completed_jobs_response_200_item_result = cls() + + list_completed_jobs_response_200_item_result.additional_properties = d + return list_completed_jobs_response_200_item_result + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_contextual_variables_response_200_item.py b/python-client/windmill-api/windmill_api/models/list_contextual_variables_response_200_item.py new file mode 100644 index 0000000000..cbe6410c50 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_contextual_variables_response_200_item.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ListContextualVariablesResponse200Item") + + +@attr.s(auto_attribs=True) +class ListContextualVariablesResponse200Item: + """ + Attributes: + name (str): + value (str): + description (str): + """ + + name: str + value: str + description: str + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + value = self.value + description = self.description + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "value": value, + "description": description, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name") + + value = d.pop("value") + + description = d.pop("description") + + list_contextual_variables_response_200_item = cls( + name=name, + value=value, + description=description, + ) + + list_contextual_variables_response_200_item.additional_properties = d + return list_contextual_variables_response_200_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item.py new file mode 100644 index 0000000000..73d2368a53 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item.py @@ -0,0 +1,149 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.list_flows_response_200_item_extra_perms import ListFlowsResponse200ItemExtraPerms +from ..models.list_flows_response_200_item_schema import ListFlowsResponse200ItemSchema +from ..models.list_flows_response_200_item_value import ListFlowsResponse200ItemValue +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListFlowsResponse200Item") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200Item: + """ + Attributes: + summary (str): + value (ListFlowsResponse200ItemValue): + path (str): + edited_by (str): + edited_at (datetime.datetime): + archived (bool): + extra_perms (ListFlowsResponse200ItemExtraPerms): + description (Union[Unset, str]): + schema (Union[Unset, ListFlowsResponse200ItemSchema]): + workspace_id (Union[Unset, str]): + additional_properties (Union[Unset, bool]): + """ + + summary: str + value: ListFlowsResponse200ItemValue + path: str + edited_by: str + edited_at: datetime.datetime + archived: bool + extra_perms: ListFlowsResponse200ItemExtraPerms + description: Union[Unset, str] = UNSET + schema: Union[Unset, ListFlowsResponse200ItemSchema] = UNSET + workspace_id: Union[Unset, str] = UNSET + additional_properties: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + summary = self.summary + value = self.value.to_dict() + + path = self.path + edited_by = self.edited_by + edited_at = self.edited_at.isoformat() + + archived = self.archived + extra_perms = self.extra_perms.to_dict() + + description = self.description + schema: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.schema, Unset): + schema = self.schema.to_dict() + + workspace_id = self.workspace_id + additional_properties = self.additional_properties + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "summary": summary, + "value": value, + "path": path, + "edited_by": edited_by, + "edited_at": edited_at, + "archived": archived, + "extra_perms": extra_perms, + } + ) + if description is not UNSET: + field_dict["description"] = description + if schema is not UNSET: + field_dict["schema"] = schema + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if additional_properties is not UNSET: + field_dict["additionalProperties"] = additional_properties + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + summary = d.pop("summary") + + value = ListFlowsResponse200ItemValue.from_dict(d.pop("value")) + + path = d.pop("path") + + edited_by = d.pop("edited_by") + + edited_at = isoparse(d.pop("edited_at")) + + archived = d.pop("archived") + + extra_perms = ListFlowsResponse200ItemExtraPerms.from_dict(d.pop("extra_perms")) + + description = d.pop("description", UNSET) + + _schema = d.pop("schema", UNSET) + schema: Union[Unset, ListFlowsResponse200ItemSchema] + if isinstance(_schema, Unset): + schema = UNSET + else: + schema = ListFlowsResponse200ItemSchema.from_dict(_schema) + + workspace_id = d.pop("workspace_id", UNSET) + + additional_properties = d.pop("additionalProperties", UNSET) + + list_flows_response_200_item = cls( + summary=summary, + value=value, + path=path, + edited_by=edited_by, + edited_at=edited_at, + archived=archived, + extra_perms=extra_perms, + description=description, + schema=schema, + workspace_id=workspace_id, + additional_properties=additional_properties, + ) + + list_flows_response_200_item.additional_properties = d + return list_flows_response_200_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_extra_perms.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_extra_perms.py new file mode 100644 index 0000000000..95ab245a52 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_extra_perms.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ListFlowsResponse200ItemExtraPerms") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemExtraPerms: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + list_flows_response_200_item_extra_perms = cls() + + list_flows_response_200_item_extra_perms.additional_properties = d + return list_flows_response_200_item_extra_perms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_schema.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_schema.py new file mode 100644 index 0000000000..a985be75bf --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_schema.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ListFlowsResponse200ItemSchema") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemSchema: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + list_flows_response_200_item_schema = cls() + + list_flows_response_200_item_schema.additional_properties = d + return list_flows_response_200_item_schema + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value.py new file mode 100644 index 0000000000..d4c9be4cae --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value.py @@ -0,0 +1,95 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_flows_response_200_item_value_failure_module import ListFlowsResponse200ItemValueFailureModule +from ..models.list_flows_response_200_item_value_modules_item import ListFlowsResponse200ItemValueModulesItem +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListFlowsResponse200ItemValue") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValue: + """ + Attributes: + modules (List[ListFlowsResponse200ItemValueModulesItem]): + failure_module (Union[Unset, ListFlowsResponse200ItemValueFailureModule]): + same_worker (Union[Unset, bool]): + """ + + modules: List[ListFlowsResponse200ItemValueModulesItem] + failure_module: Union[Unset, ListFlowsResponse200ItemValueFailureModule] = UNSET + same_worker: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + modules = [] + for modules_item_data in self.modules: + modules_item = modules_item_data.to_dict() + + modules.append(modules_item) + + failure_module: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.failure_module, Unset): + failure_module = self.failure_module.to_dict() + + same_worker = self.same_worker + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "modules": modules, + } + ) + if failure_module is not UNSET: + field_dict["failure_module"] = failure_module + if same_worker is not UNSET: + field_dict["same_worker"] = same_worker + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + modules = [] + _modules = d.pop("modules") + for modules_item_data in _modules: + modules_item = ListFlowsResponse200ItemValueModulesItem.from_dict(modules_item_data) + + modules.append(modules_item) + + _failure_module = d.pop("failure_module", UNSET) + failure_module: Union[Unset, ListFlowsResponse200ItemValueFailureModule] + if isinstance(_failure_module, Unset): + failure_module = UNSET + else: + failure_module = ListFlowsResponse200ItemValueFailureModule.from_dict(_failure_module) + + same_worker = d.pop("same_worker", UNSET) + + list_flows_response_200_item_value = cls( + modules=modules, + failure_module=failure_module, + same_worker=same_worker, + ) + + list_flows_response_200_item_value.additional_properties = d + return list_flows_response_200_item_value + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module.py new file mode 100644 index 0000000000..f3e9832f5a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module.py @@ -0,0 +1,258 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_flows_response_200_item_value_failure_module_input_transforms import ( + ListFlowsResponse200ItemValueFailureModuleInputTransforms, +) +from ..models.list_flows_response_200_item_value_failure_module_retry import ( + ListFlowsResponse200ItemValueFailureModuleRetry, +) +from ..models.list_flows_response_200_item_value_failure_module_sleep_type_0 import ( + ListFlowsResponse200ItemValueFailureModuleSleepType0, +) +from ..models.list_flows_response_200_item_value_failure_module_sleep_type_1 import ( + ListFlowsResponse200ItemValueFailureModuleSleepType1, +) +from ..models.list_flows_response_200_item_value_failure_module_stop_after_if import ( + ListFlowsResponse200ItemValueFailureModuleStopAfterIf, +) +from ..models.list_flows_response_200_item_value_failure_module_value_type_0 import ( + ListFlowsResponse200ItemValueFailureModuleValueType0, +) +from ..models.list_flows_response_200_item_value_failure_module_value_type_1 import ( + ListFlowsResponse200ItemValueFailureModuleValueType1, +) +from ..models.list_flows_response_200_item_value_failure_module_value_type_2 import ( + ListFlowsResponse200ItemValueFailureModuleValueType2, +) +from ..models.list_flows_response_200_item_value_failure_module_value_type_3 import ( + ListFlowsResponse200ItemValueFailureModuleValueType3, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueFailureModule") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueFailureModule: + """ + Attributes: + input_transforms (ListFlowsResponse200ItemValueFailureModuleInputTransforms): + value (Union[ListFlowsResponse200ItemValueFailureModuleValueType0, + ListFlowsResponse200ItemValueFailureModuleValueType1, ListFlowsResponse200ItemValueFailureModuleValueType2, + ListFlowsResponse200ItemValueFailureModuleValueType3]): + stop_after_if (Union[Unset, ListFlowsResponse200ItemValueFailureModuleStopAfterIf]): + sleep (Union[ListFlowsResponse200ItemValueFailureModuleSleepType0, + ListFlowsResponse200ItemValueFailureModuleSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, ListFlowsResponse200ItemValueFailureModuleRetry]): + """ + + input_transforms: ListFlowsResponse200ItemValueFailureModuleInputTransforms + value: Union[ + ListFlowsResponse200ItemValueFailureModuleValueType0, + ListFlowsResponse200ItemValueFailureModuleValueType1, + ListFlowsResponse200ItemValueFailureModuleValueType2, + ListFlowsResponse200ItemValueFailureModuleValueType3, + ] + stop_after_if: Union[Unset, ListFlowsResponse200ItemValueFailureModuleStopAfterIf] = UNSET + sleep: Union[ + ListFlowsResponse200ItemValueFailureModuleSleepType0, + ListFlowsResponse200ItemValueFailureModuleSleepType1, + Unset, + ] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, ListFlowsResponse200ItemValueFailureModuleRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, ListFlowsResponse200ItemValueFailureModuleValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, ListFlowsResponse200ItemValueFailureModuleValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, ListFlowsResponse200ItemValueFailureModuleValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, ListFlowsResponse200ItemValueFailureModuleSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = ListFlowsResponse200ItemValueFailureModuleInputTransforms.from_dict( + d.pop("input_transforms") + ) + + def _parse_value( + data: object, + ) -> Union[ + ListFlowsResponse200ItemValueFailureModuleValueType0, + ListFlowsResponse200ItemValueFailureModuleValueType1, + ListFlowsResponse200ItemValueFailureModuleValueType2, + ListFlowsResponse200ItemValueFailureModuleValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = ListFlowsResponse200ItemValueFailureModuleValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = ListFlowsResponse200ItemValueFailureModuleValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = ListFlowsResponse200ItemValueFailureModuleValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = ListFlowsResponse200ItemValueFailureModuleValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, ListFlowsResponse200ItemValueFailureModuleStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = ListFlowsResponse200ItemValueFailureModuleStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[ + ListFlowsResponse200ItemValueFailureModuleSleepType0, + ListFlowsResponse200ItemValueFailureModuleSleepType1, + Unset, + ]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, ListFlowsResponse200ItemValueFailureModuleSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = ListFlowsResponse200ItemValueFailureModuleSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, ListFlowsResponse200ItemValueFailureModuleSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = ListFlowsResponse200ItemValueFailureModuleSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, ListFlowsResponse200ItemValueFailureModuleRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = ListFlowsResponse200ItemValueFailureModuleRetry.from_dict(_retry) + + list_flows_response_200_item_value_failure_module = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + list_flows_response_200_item_value_failure_module.additional_properties = d + return list_flows_response_200_item_value_failure_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_input_transforms.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_input_transforms.py new file mode 100644 index 0000000000..2e92c4bdd4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_input_transforms.py @@ -0,0 +1,107 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_0 import ( + ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType0, +) +from ..models.list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_1 import ( + ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueFailureModuleInputTransforms") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueFailureModuleInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType0, + ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + list_flows_response_200_item_value_failure_module_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType0, + ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType0.from_dict(data) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType1.from_dict(data) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + list_flows_response_200_item_value_failure_module_input_transforms.additional_properties = additional_properties + return list_flows_response_200_item_value_failure_module_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType0, + ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType0, + ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..c45f6f64bd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_0.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_0_type import ( + ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_0.additional_properties = ( + d + ) + return list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..bb5e00c4a6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..dec1682c26 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_1.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_1_type import ( + ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_1.additional_properties = ( + d + ) + return list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..5893afee0d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListFlowsResponse200ItemValueFailureModuleInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_retry.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_retry.py new file mode 100644 index 0000000000..5530b118c4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_retry.py @@ -0,0 +1,86 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_flows_response_200_item_value_failure_module_retry_constant import ( + ListFlowsResponse200ItemValueFailureModuleRetryConstant, +) +from ..models.list_flows_response_200_item_value_failure_module_retry_exponential import ( + ListFlowsResponse200ItemValueFailureModuleRetryExponential, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueFailureModuleRetry") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueFailureModuleRetry: + """ + Attributes: + constant (Union[Unset, ListFlowsResponse200ItemValueFailureModuleRetryConstant]): + exponential (Union[Unset, ListFlowsResponse200ItemValueFailureModuleRetryExponential]): + """ + + constant: Union[Unset, ListFlowsResponse200ItemValueFailureModuleRetryConstant] = UNSET + exponential: Union[Unset, ListFlowsResponse200ItemValueFailureModuleRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, ListFlowsResponse200ItemValueFailureModuleRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = ListFlowsResponse200ItemValueFailureModuleRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, ListFlowsResponse200ItemValueFailureModuleRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = ListFlowsResponse200ItemValueFailureModuleRetryExponential.from_dict(_exponential) + + list_flows_response_200_item_value_failure_module_retry = cls( + constant=constant, + exponential=exponential, + ) + + list_flows_response_200_item_value_failure_module_retry.additional_properties = d + return list_flows_response_200_item_value_failure_module_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_retry_constant.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_retry_constant.py new file mode 100644 index 0000000000..34beb32d3e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueFailureModuleRetryConstant") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueFailureModuleRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + list_flows_response_200_item_value_failure_module_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + list_flows_response_200_item_value_failure_module_retry_constant.additional_properties = d + return list_flows_response_200_item_value_failure_module_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_retry_exponential.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_retry_exponential.py new file mode 100644 index 0000000000..cb1390f9cb --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueFailureModuleRetryExponential") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueFailureModuleRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + list_flows_response_200_item_value_failure_module_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + list_flows_response_200_item_value_failure_module_retry_exponential.additional_properties = d + return list_flows_response_200_item_value_failure_module_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_sleep_type_0.py new file mode 100644 index 0000000000..084148ce05 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_sleep_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_flows_response_200_item_value_failure_module_sleep_type_0_type import ( + ListFlowsResponse200ItemValueFailureModuleSleepType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueFailureModuleSleepType0") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueFailureModuleSleepType0: + """ + Attributes: + type (ListFlowsResponse200ItemValueFailureModuleSleepType0Type): + value (Union[Unset, Any]): + """ + + type: ListFlowsResponse200ItemValueFailureModuleSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListFlowsResponse200ItemValueFailureModuleSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + list_flows_response_200_item_value_failure_module_sleep_type_0 = cls( + type=type, + value=value, + ) + + list_flows_response_200_item_value_failure_module_sleep_type_0.additional_properties = d + return list_flows_response_200_item_value_failure_module_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_sleep_type_0_type.py new file mode 100644 index 0000000000..f83997be5a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListFlowsResponse200ItemValueFailureModuleSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_sleep_type_1.py new file mode 100644 index 0000000000..5a93caddd6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_sleep_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_flows_response_200_item_value_failure_module_sleep_type_1_type import ( + ListFlowsResponse200ItemValueFailureModuleSleepType1Type, +) + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueFailureModuleSleepType1") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueFailureModuleSleepType1: + """ + Attributes: + expr (str): + type (ListFlowsResponse200ItemValueFailureModuleSleepType1Type): + """ + + expr: str + type: ListFlowsResponse200ItemValueFailureModuleSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = ListFlowsResponse200ItemValueFailureModuleSleepType1Type(d.pop("type")) + + list_flows_response_200_item_value_failure_module_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + list_flows_response_200_item_value_failure_module_sleep_type_1.additional_properties = d + return list_flows_response_200_item_value_failure_module_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_sleep_type_1_type.py new file mode 100644 index 0000000000..d0271db593 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListFlowsResponse200ItemValueFailureModuleSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_stop_after_if.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_stop_after_if.py new file mode 100644 index 0000000000..e804569d6a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueFailureModuleStopAfterIf") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueFailureModuleStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + list_flows_response_200_item_value_failure_module_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + list_flows_response_200_item_value_failure_module_stop_after_if.additional_properties = d + return list_flows_response_200_item_value_failure_module_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_0.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_0.py new file mode 100644 index 0000000000..51086f84ee --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_flows_response_200_item_value_failure_module_value_type_0_language import ( + ListFlowsResponse200ItemValueFailureModuleValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueFailureModuleValueType0") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueFailureModuleValueType0: + """ + Attributes: + content (str): + language (ListFlowsResponse200ItemValueFailureModuleValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: ListFlowsResponse200ItemValueFailureModuleValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = ListFlowsResponse200ItemValueFailureModuleValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + list_flows_response_200_item_value_failure_module_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + list_flows_response_200_item_value_failure_module_value_type_0.additional_properties = d + return list_flows_response_200_item_value_failure_module_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_0_language.py new file mode 100644 index 0000000000..36814a2368 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ListFlowsResponse200ItemValueFailureModuleValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_1.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_1.py new file mode 100644 index 0000000000..d91e14a14e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_flows_response_200_item_value_failure_module_value_type_1_type import ( + ListFlowsResponse200ItemValueFailureModuleValueType1Type, +) + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueFailureModuleValueType1") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueFailureModuleValueType1: + """ + Attributes: + path (str): + type (ListFlowsResponse200ItemValueFailureModuleValueType1Type): + """ + + path: str + type: ListFlowsResponse200ItemValueFailureModuleValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = ListFlowsResponse200ItemValueFailureModuleValueType1Type(d.pop("type")) + + list_flows_response_200_item_value_failure_module_value_type_1 = cls( + path=path, + type=type, + ) + + list_flows_response_200_item_value_failure_module_value_type_1.additional_properties = d + return list_flows_response_200_item_value_failure_module_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_1_type.py new file mode 100644 index 0000000000..9a73def7dc --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListFlowsResponse200ItemValueFailureModuleValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2.py new file mode 100644 index 0000000000..cef42bf7f0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2.py @@ -0,0 +1,112 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_0 import ( + ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType0, +) +from ..models.list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_1 import ( + ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType1, +) +from ..models.list_flows_response_200_item_value_failure_module_value_type_2_type import ( + ListFlowsResponse200ItemValueFailureModuleValueType2Type, +) + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueFailureModuleValueType2") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueFailureModuleValueType2: + """ + Attributes: + iterator (Union[ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType0, + ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType1]): + skip_failures (bool): + type (ListFlowsResponse200ItemValueFailureModuleValueType2Type): + """ + + iterator: Union[ + ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType0, + ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType1, + ] + skip_failures: bool + type: ListFlowsResponse200ItemValueFailureModuleValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType0, + ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = ListFlowsResponse200ItemValueFailureModuleValueType2Type(d.pop("type")) + + list_flows_response_200_item_value_failure_module_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + list_flows_response_200_item_value_failure_module_value_type_2.additional_properties = d + return list_flows_response_200_item_value_failure_module_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..fae57fb365 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_0_type import ( + ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType0: + """ + Attributes: + type (ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_0.additional_properties = d + return list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..5135213e81 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..3d7e578ba7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_1_type import ( + ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType1: + """ + Attributes: + expr (str): + type (ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType1Type): + """ + + expr: str + type: ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType1Type(d.pop("type")) + + list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_1.additional_properties = d + return list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..124eb05a58 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListFlowsResponse200ItemValueFailureModuleValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2_type.py new file mode 100644 index 0000000000..4219b1ace1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListFlowsResponse200ItemValueFailureModuleValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_3.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_3.py new file mode 100644 index 0000000000..15977cbd0e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_3.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_flows_response_200_item_value_failure_module_value_type_3_type import ( + ListFlowsResponse200ItemValueFailureModuleValueType3Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueFailureModuleValueType3") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueFailureModuleValueType3: + """ + Attributes: + type (ListFlowsResponse200ItemValueFailureModuleValueType3Type): + path (Union[Unset, str]): + """ + + type: ListFlowsResponse200ItemValueFailureModuleValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListFlowsResponse200ItemValueFailureModuleValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + list_flows_response_200_item_value_failure_module_value_type_3 = cls( + type=type, + path=path, + ) + + list_flows_response_200_item_value_failure_module_value_type_3.additional_properties = d + return list_flows_response_200_item_value_failure_module_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_3_type.py new file mode 100644 index 0000000000..1b5b3c4d87 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_failure_module_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListFlowsResponse200ItemValueFailureModuleValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item.py new file mode 100644 index 0000000000..43188b266d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item.py @@ -0,0 +1,252 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_flows_response_200_item_value_modules_item_input_transforms import ( + ListFlowsResponse200ItemValueModulesItemInputTransforms, +) +from ..models.list_flows_response_200_item_value_modules_item_retry import ListFlowsResponse200ItemValueModulesItemRetry +from ..models.list_flows_response_200_item_value_modules_item_sleep_type_0 import ( + ListFlowsResponse200ItemValueModulesItemSleepType0, +) +from ..models.list_flows_response_200_item_value_modules_item_sleep_type_1 import ( + ListFlowsResponse200ItemValueModulesItemSleepType1, +) +from ..models.list_flows_response_200_item_value_modules_item_stop_after_if import ( + ListFlowsResponse200ItemValueModulesItemStopAfterIf, +) +from ..models.list_flows_response_200_item_value_modules_item_value_type_0 import ( + ListFlowsResponse200ItemValueModulesItemValueType0, +) +from ..models.list_flows_response_200_item_value_modules_item_value_type_1 import ( + ListFlowsResponse200ItemValueModulesItemValueType1, +) +from ..models.list_flows_response_200_item_value_modules_item_value_type_2 import ( + ListFlowsResponse200ItemValueModulesItemValueType2, +) +from ..models.list_flows_response_200_item_value_modules_item_value_type_3 import ( + ListFlowsResponse200ItemValueModulesItemValueType3, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueModulesItem") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueModulesItem: + """ + Attributes: + input_transforms (ListFlowsResponse200ItemValueModulesItemInputTransforms): + value (Union[ListFlowsResponse200ItemValueModulesItemValueType0, + ListFlowsResponse200ItemValueModulesItemValueType1, ListFlowsResponse200ItemValueModulesItemValueType2, + ListFlowsResponse200ItemValueModulesItemValueType3]): + stop_after_if (Union[Unset, ListFlowsResponse200ItemValueModulesItemStopAfterIf]): + sleep (Union[ListFlowsResponse200ItemValueModulesItemSleepType0, + ListFlowsResponse200ItemValueModulesItemSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, ListFlowsResponse200ItemValueModulesItemRetry]): + """ + + input_transforms: ListFlowsResponse200ItemValueModulesItemInputTransforms + value: Union[ + ListFlowsResponse200ItemValueModulesItemValueType0, + ListFlowsResponse200ItemValueModulesItemValueType1, + ListFlowsResponse200ItemValueModulesItemValueType2, + ListFlowsResponse200ItemValueModulesItemValueType3, + ] + stop_after_if: Union[Unset, ListFlowsResponse200ItemValueModulesItemStopAfterIf] = UNSET + sleep: Union[ + ListFlowsResponse200ItemValueModulesItemSleepType0, ListFlowsResponse200ItemValueModulesItemSleepType1, Unset + ] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, ListFlowsResponse200ItemValueModulesItemRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, ListFlowsResponse200ItemValueModulesItemValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, ListFlowsResponse200ItemValueModulesItemValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, ListFlowsResponse200ItemValueModulesItemValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, ListFlowsResponse200ItemValueModulesItemSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = ListFlowsResponse200ItemValueModulesItemInputTransforms.from_dict(d.pop("input_transforms")) + + def _parse_value( + data: object, + ) -> Union[ + ListFlowsResponse200ItemValueModulesItemValueType0, + ListFlowsResponse200ItemValueModulesItemValueType1, + ListFlowsResponse200ItemValueModulesItemValueType2, + ListFlowsResponse200ItemValueModulesItemValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = ListFlowsResponse200ItemValueModulesItemValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = ListFlowsResponse200ItemValueModulesItemValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = ListFlowsResponse200ItemValueModulesItemValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = ListFlowsResponse200ItemValueModulesItemValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, ListFlowsResponse200ItemValueModulesItemStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = ListFlowsResponse200ItemValueModulesItemStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[ + ListFlowsResponse200ItemValueModulesItemSleepType0, + ListFlowsResponse200ItemValueModulesItemSleepType1, + Unset, + ]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, ListFlowsResponse200ItemValueModulesItemSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = ListFlowsResponse200ItemValueModulesItemSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, ListFlowsResponse200ItemValueModulesItemSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = ListFlowsResponse200ItemValueModulesItemSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, ListFlowsResponse200ItemValueModulesItemRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = ListFlowsResponse200ItemValueModulesItemRetry.from_dict(_retry) + + list_flows_response_200_item_value_modules_item = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + list_flows_response_200_item_value_modules_item.additional_properties = d + return list_flows_response_200_item_value_modules_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_input_transforms.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_input_transforms.py new file mode 100644 index 0000000000..7eec3dfda1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_input_transforms.py @@ -0,0 +1,107 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_0 import ( + ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType0, +) +from ..models.list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_1 import ( + ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueModulesItemInputTransforms") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueModulesItemInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType0, + ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + list_flows_response_200_item_value_modules_item_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType0, + ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType0.from_dict(data) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType1.from_dict(data) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + list_flows_response_200_item_value_modules_item_input_transforms.additional_properties = additional_properties + return list_flows_response_200_item_value_modules_item_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType0, + ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType0, + ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..80740d9e3d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_0.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_0_type import ( + ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_0.additional_properties = ( + d + ) + return list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..7a79c174ee --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..7026128e38 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_1.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_1_type import ( + ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_1.additional_properties = ( + d + ) + return list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..80ab1ab1fb --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListFlowsResponse200ItemValueModulesItemInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_retry.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_retry.py new file mode 100644 index 0000000000..ff8cc7ed13 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_retry.py @@ -0,0 +1,86 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_flows_response_200_item_value_modules_item_retry_constant import ( + ListFlowsResponse200ItemValueModulesItemRetryConstant, +) +from ..models.list_flows_response_200_item_value_modules_item_retry_exponential import ( + ListFlowsResponse200ItemValueModulesItemRetryExponential, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueModulesItemRetry") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueModulesItemRetry: + """ + Attributes: + constant (Union[Unset, ListFlowsResponse200ItemValueModulesItemRetryConstant]): + exponential (Union[Unset, ListFlowsResponse200ItemValueModulesItemRetryExponential]): + """ + + constant: Union[Unset, ListFlowsResponse200ItemValueModulesItemRetryConstant] = UNSET + exponential: Union[Unset, ListFlowsResponse200ItemValueModulesItemRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, ListFlowsResponse200ItemValueModulesItemRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = ListFlowsResponse200ItemValueModulesItemRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, ListFlowsResponse200ItemValueModulesItemRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = ListFlowsResponse200ItemValueModulesItemRetryExponential.from_dict(_exponential) + + list_flows_response_200_item_value_modules_item_retry = cls( + constant=constant, + exponential=exponential, + ) + + list_flows_response_200_item_value_modules_item_retry.additional_properties = d + return list_flows_response_200_item_value_modules_item_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_retry_constant.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_retry_constant.py new file mode 100644 index 0000000000..f9b626ff25 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueModulesItemRetryConstant") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueModulesItemRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + list_flows_response_200_item_value_modules_item_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + list_flows_response_200_item_value_modules_item_retry_constant.additional_properties = d + return list_flows_response_200_item_value_modules_item_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_retry_exponential.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_retry_exponential.py new file mode 100644 index 0000000000..1238534b71 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueModulesItemRetryExponential") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueModulesItemRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + list_flows_response_200_item_value_modules_item_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + list_flows_response_200_item_value_modules_item_retry_exponential.additional_properties = d + return list_flows_response_200_item_value_modules_item_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_sleep_type_0.py new file mode 100644 index 0000000000..0065a4d9ce --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_sleep_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_flows_response_200_item_value_modules_item_sleep_type_0_type import ( + ListFlowsResponse200ItemValueModulesItemSleepType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueModulesItemSleepType0") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueModulesItemSleepType0: + """ + Attributes: + type (ListFlowsResponse200ItemValueModulesItemSleepType0Type): + value (Union[Unset, Any]): + """ + + type: ListFlowsResponse200ItemValueModulesItemSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListFlowsResponse200ItemValueModulesItemSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + list_flows_response_200_item_value_modules_item_sleep_type_0 = cls( + type=type, + value=value, + ) + + list_flows_response_200_item_value_modules_item_sleep_type_0.additional_properties = d + return list_flows_response_200_item_value_modules_item_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_sleep_type_0_type.py new file mode 100644 index 0000000000..25311a2ada --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListFlowsResponse200ItemValueModulesItemSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_sleep_type_1.py new file mode 100644 index 0000000000..5940ed4f12 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_sleep_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_flows_response_200_item_value_modules_item_sleep_type_1_type import ( + ListFlowsResponse200ItemValueModulesItemSleepType1Type, +) + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueModulesItemSleepType1") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueModulesItemSleepType1: + """ + Attributes: + expr (str): + type (ListFlowsResponse200ItemValueModulesItemSleepType1Type): + """ + + expr: str + type: ListFlowsResponse200ItemValueModulesItemSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = ListFlowsResponse200ItemValueModulesItemSleepType1Type(d.pop("type")) + + list_flows_response_200_item_value_modules_item_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + list_flows_response_200_item_value_modules_item_sleep_type_1.additional_properties = d + return list_flows_response_200_item_value_modules_item_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_sleep_type_1_type.py new file mode 100644 index 0000000000..a4ac615150 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListFlowsResponse200ItemValueModulesItemSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_stop_after_if.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_stop_after_if.py new file mode 100644 index 0000000000..2a7f3a901d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueModulesItemStopAfterIf") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueModulesItemStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + list_flows_response_200_item_value_modules_item_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + list_flows_response_200_item_value_modules_item_stop_after_if.additional_properties = d + return list_flows_response_200_item_value_modules_item_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_0.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_0.py new file mode 100644 index 0000000000..758d9ab973 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_flows_response_200_item_value_modules_item_value_type_0_language import ( + ListFlowsResponse200ItemValueModulesItemValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueModulesItemValueType0") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueModulesItemValueType0: + """ + Attributes: + content (str): + language (ListFlowsResponse200ItemValueModulesItemValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: ListFlowsResponse200ItemValueModulesItemValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = ListFlowsResponse200ItemValueModulesItemValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + list_flows_response_200_item_value_modules_item_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + list_flows_response_200_item_value_modules_item_value_type_0.additional_properties = d + return list_flows_response_200_item_value_modules_item_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_0_language.py new file mode 100644 index 0000000000..1b1f952cb8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ListFlowsResponse200ItemValueModulesItemValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_1.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_1.py new file mode 100644 index 0000000000..9186080441 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_flows_response_200_item_value_modules_item_value_type_1_type import ( + ListFlowsResponse200ItemValueModulesItemValueType1Type, +) + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueModulesItemValueType1") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueModulesItemValueType1: + """ + Attributes: + path (str): + type (ListFlowsResponse200ItemValueModulesItemValueType1Type): + """ + + path: str + type: ListFlowsResponse200ItemValueModulesItemValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = ListFlowsResponse200ItemValueModulesItemValueType1Type(d.pop("type")) + + list_flows_response_200_item_value_modules_item_value_type_1 = cls( + path=path, + type=type, + ) + + list_flows_response_200_item_value_modules_item_value_type_1.additional_properties = d + return list_flows_response_200_item_value_modules_item_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_1_type.py new file mode 100644 index 0000000000..b42d33e750 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListFlowsResponse200ItemValueModulesItemValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2.py new file mode 100644 index 0000000000..09056b069d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2.py @@ -0,0 +1,112 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_0 import ( + ListFlowsResponse200ItemValueModulesItemValueType2IteratorType0, +) +from ..models.list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_1 import ( + ListFlowsResponse200ItemValueModulesItemValueType2IteratorType1, +) +from ..models.list_flows_response_200_item_value_modules_item_value_type_2_type import ( + ListFlowsResponse200ItemValueModulesItemValueType2Type, +) + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueModulesItemValueType2") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueModulesItemValueType2: + """ + Attributes: + iterator (Union[ListFlowsResponse200ItemValueModulesItemValueType2IteratorType0, + ListFlowsResponse200ItemValueModulesItemValueType2IteratorType1]): + skip_failures (bool): + type (ListFlowsResponse200ItemValueModulesItemValueType2Type): + """ + + iterator: Union[ + ListFlowsResponse200ItemValueModulesItemValueType2IteratorType0, + ListFlowsResponse200ItemValueModulesItemValueType2IteratorType1, + ] + skip_failures: bool + type: ListFlowsResponse200ItemValueModulesItemValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, ListFlowsResponse200ItemValueModulesItemValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + ListFlowsResponse200ItemValueModulesItemValueType2IteratorType0, + ListFlowsResponse200ItemValueModulesItemValueType2IteratorType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = ListFlowsResponse200ItemValueModulesItemValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = ListFlowsResponse200ItemValueModulesItemValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = ListFlowsResponse200ItemValueModulesItemValueType2Type(d.pop("type")) + + list_flows_response_200_item_value_modules_item_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + list_flows_response_200_item_value_modules_item_value_type_2.additional_properties = d + return list_flows_response_200_item_value_modules_item_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..b69ec740cc --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_0_type import ( + ListFlowsResponse200ItemValueModulesItemValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueModulesItemValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueModulesItemValueType2IteratorType0: + """ + Attributes: + type (ListFlowsResponse200ItemValueModulesItemValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: ListFlowsResponse200ItemValueModulesItemValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListFlowsResponse200ItemValueModulesItemValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_0.additional_properties = d + return list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..35e82082e9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListFlowsResponse200ItemValueModulesItemValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..487f5380a7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_1_type import ( + ListFlowsResponse200ItemValueModulesItemValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueModulesItemValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueModulesItemValueType2IteratorType1: + """ + Attributes: + expr (str): + type (ListFlowsResponse200ItemValueModulesItemValueType2IteratorType1Type): + """ + + expr: str + type: ListFlowsResponse200ItemValueModulesItemValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = ListFlowsResponse200ItemValueModulesItemValueType2IteratorType1Type(d.pop("type")) + + list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_1.additional_properties = d + return list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..fd7fcef382 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListFlowsResponse200ItemValueModulesItemValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2_type.py new file mode 100644 index 0000000000..d6388bd2c5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListFlowsResponse200ItemValueModulesItemValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_3.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_3.py new file mode 100644 index 0000000000..4d9bc39aa0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_3.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_flows_response_200_item_value_modules_item_value_type_3_type import ( + ListFlowsResponse200ItemValueModulesItemValueType3Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListFlowsResponse200ItemValueModulesItemValueType3") + + +@attr.s(auto_attribs=True) +class ListFlowsResponse200ItemValueModulesItemValueType3: + """ + Attributes: + type (ListFlowsResponse200ItemValueModulesItemValueType3Type): + path (Union[Unset, str]): + """ + + type: ListFlowsResponse200ItemValueModulesItemValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListFlowsResponse200ItemValueModulesItemValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + list_flows_response_200_item_value_modules_item_value_type_3 = cls( + type=type, + path=path, + ) + + list_flows_response_200_item_value_modules_item_value_type_3.additional_properties = d + return list_flows_response_200_item_value_modules_item_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_3_type.py new file mode 100644 index 0000000000..680a5a19c1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_flows_response_200_item_value_modules_item_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListFlowsResponse200ItemValueModulesItemValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_groups_response_200_item.py b/python-client/windmill-api/windmill_api/models/list_groups_response_200_item.py new file mode 100644 index 0000000000..8904edf1e5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_groups_response_200_item.py @@ -0,0 +1,94 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.list_groups_response_200_item_extra_perms import ListGroupsResponse200ItemExtraPerms +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListGroupsResponse200Item") + + +@attr.s(auto_attribs=True) +class ListGroupsResponse200Item: + """ + Attributes: + name (str): + summary (Union[Unset, str]): + members (Union[Unset, List[str]]): + extra_perms (Union[Unset, ListGroupsResponse200ItemExtraPerms]): + """ + + name: str + summary: Union[Unset, str] = UNSET + members: Union[Unset, List[str]] = UNSET + extra_perms: Union[Unset, ListGroupsResponse200ItemExtraPerms] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + summary = self.summary + members: Union[Unset, List[str]] = UNSET + if not isinstance(self.members, Unset): + members = self.members + + extra_perms: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.extra_perms, Unset): + extra_perms = self.extra_perms.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if summary is not UNSET: + field_dict["summary"] = summary + if members is not UNSET: + field_dict["members"] = members + if extra_perms is not UNSET: + field_dict["extra_perms"] = extra_perms + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name") + + summary = d.pop("summary", UNSET) + + members = cast(List[str], d.pop("members", UNSET)) + + _extra_perms = d.pop("extra_perms", UNSET) + extra_perms: Union[Unset, ListGroupsResponse200ItemExtraPerms] + if isinstance(_extra_perms, Unset): + extra_perms = UNSET + else: + extra_perms = ListGroupsResponse200ItemExtraPerms.from_dict(_extra_perms) + + list_groups_response_200_item = cls( + name=name, + summary=summary, + members=members, + extra_perms=extra_perms, + ) + + list_groups_response_200_item.additional_properties = d + return list_groups_response_200_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_groups_response_200_item_extra_perms.py b/python-client/windmill-api/windmill_api/models/list_groups_response_200_item_extra_perms.py new file mode 100644 index 0000000000..9edf107649 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_groups_response_200_item_extra_perms.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ListGroupsResponse200ItemExtraPerms") + + +@attr.s(auto_attribs=True) +class ListGroupsResponse200ItemExtraPerms: + """ """ + + additional_properties: Dict[str, bool] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + list_groups_response_200_item_extra_perms = cls() + + list_groups_response_200_item_extra_perms.additional_properties = d + return list_groups_response_200_item_extra_perms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> bool: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: bool) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_hub_flows_response_200.py b/python-client/windmill-api/windmill_api/models/list_hub_flows_response_200.py new file mode 100644 index 0000000000..355b2266b9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_hub_flows_response_200.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_hub_flows_response_200_flows_item import ListHubFlowsResponse200FlowsItem +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListHubFlowsResponse200") + + +@attr.s(auto_attribs=True) +class ListHubFlowsResponse200: + """ + Attributes: + flows (Union[Unset, List[ListHubFlowsResponse200FlowsItem]]): + """ + + flows: Union[Unset, List[ListHubFlowsResponse200FlowsItem]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + flows: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.flows, Unset): + flows = [] + for flows_item_data in self.flows: + flows_item = flows_item_data.to_dict() + + flows.append(flows_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if flows is not UNSET: + field_dict["flows"] = flows + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + flows = [] + _flows = d.pop("flows", UNSET) + for flows_item_data in _flows or []: + flows_item = ListHubFlowsResponse200FlowsItem.from_dict(flows_item_data) + + flows.append(flows_item) + + list_hub_flows_response_200 = cls( + flows=flows, + ) + + list_hub_flows_response_200.additional_properties = d + return list_hub_flows_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_hub_flows_response_200_flows_item.py b/python-client/windmill-api/windmill_api/models/list_hub_flows_response_200_flows_item.py new file mode 100644 index 0000000000..6d014d361e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_hub_flows_response_200_flows_item.py @@ -0,0 +1,93 @@ +from typing import Any, Dict, List, Type, TypeVar, cast + +import attr + +T = TypeVar("T", bound="ListHubFlowsResponse200FlowsItem") + + +@attr.s(auto_attribs=True) +class ListHubFlowsResponse200FlowsItem: + """ + Attributes: + id (float): + flow_id (float): + summary (str): + apps (List[str]): + approved (bool): + votes (float): + """ + + id: float + flow_id: float + summary: str + apps: List[str] + approved: bool + votes: float + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + flow_id = self.flow_id + summary = self.summary + apps = self.apps + + approved = self.approved + votes = self.votes + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "flow_id": flow_id, + "summary": summary, + "apps": apps, + "approved": approved, + "votes": votes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id") + + flow_id = d.pop("flow_id") + + summary = d.pop("summary") + + apps = cast(List[str], d.pop("apps")) + + approved = d.pop("approved") + + votes = d.pop("votes") + + list_hub_flows_response_200_flows_item = cls( + id=id, + flow_id=flow_id, + summary=summary, + apps=apps, + approved=approved, + votes=votes, + ) + + list_hub_flows_response_200_flows_item.additional_properties = d + return list_hub_flows_response_200_flows_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_hub_scripts_response_200.py b/python-client/windmill-api/windmill_api/models/list_hub_scripts_response_200.py new file mode 100644 index 0000000000..d2c03363de --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_hub_scripts_response_200.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_hub_scripts_response_200_asks_item import ListHubScriptsResponse200AsksItem +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListHubScriptsResponse200") + + +@attr.s(auto_attribs=True) +class ListHubScriptsResponse200: + """ + Attributes: + asks (Union[Unset, List[ListHubScriptsResponse200AsksItem]]): + """ + + asks: Union[Unset, List[ListHubScriptsResponse200AsksItem]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + asks: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.asks, Unset): + asks = [] + for asks_item_data in self.asks: + asks_item = asks_item_data.to_dict() + + asks.append(asks_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if asks is not UNSET: + field_dict["asks"] = asks + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + asks = [] + _asks = d.pop("asks", UNSET) + for asks_item_data in _asks or []: + asks_item = ListHubScriptsResponse200AsksItem.from_dict(asks_item_data) + + asks.append(asks_item) + + list_hub_scripts_response_200 = cls( + asks=asks, + ) + + list_hub_scripts_response_200.additional_properties = d + return list_hub_scripts_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_hub_scripts_response_200_asks_item.py b/python-client/windmill-api/windmill_api/models/list_hub_scripts_response_200_asks_item.py new file mode 100644 index 0000000000..e0f2933810 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_hub_scripts_response_200_asks_item.py @@ -0,0 +1,109 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_hub_scripts_response_200_asks_item_kind import ListHubScriptsResponse200AsksItemKind + +T = TypeVar("T", bound="ListHubScriptsResponse200AsksItem") + + +@attr.s(auto_attribs=True) +class ListHubScriptsResponse200AsksItem: + """ + Attributes: + id (float): + ask_id (float): + summary (str): + app (str): + approved (bool): + kind (ListHubScriptsResponse200AsksItemKind): + votes (float): + views (float): + """ + + id: float + ask_id: float + summary: str + app: str + approved: bool + kind: ListHubScriptsResponse200AsksItemKind + votes: float + views: float + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + ask_id = self.ask_id + summary = self.summary + app = self.app + approved = self.approved + kind = self.kind.value + + votes = self.votes + views = self.views + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "ask_id": ask_id, + "summary": summary, + "app": app, + "approved": approved, + "kind": kind, + "votes": votes, + "views": views, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id") + + ask_id = d.pop("ask_id") + + summary = d.pop("summary") + + app = d.pop("app") + + approved = d.pop("approved") + + kind = ListHubScriptsResponse200AsksItemKind(d.pop("kind")) + + votes = d.pop("votes") + + views = d.pop("views") + + list_hub_scripts_response_200_asks_item = cls( + id=id, + ask_id=ask_id, + summary=summary, + app=app, + approved=approved, + kind=kind, + votes=votes, + views=views, + ) + + list_hub_scripts_response_200_asks_item.additional_properties = d + return list_hub_scripts_response_200_asks_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_hub_scripts_response_200_asks_item_kind.py b/python-client/windmill-api/windmill_api/models/list_hub_scripts_response_200_asks_item_kind.py new file mode 100644 index 0000000000..238bf7b98d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_hub_scripts_response_200_asks_item_kind.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class ListHubScriptsResponse200AsksItemKind(str, Enum): + SCRIPT = "script" + FAILURE = "failure" + TRIGGER = "trigger" + COMMAND = "command" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_jobs_response_200_item.py b/python-client/windmill-api/windmill_api/models/list_jobs_response_200_item.py new file mode 100644 index 0000000000..778609ca5f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_jobs_response_200_item.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_jobs_response_200_item_type import ListJobsResponse200ItemType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListJobsResponse200Item") + + +@attr.s(auto_attribs=True) +class ListJobsResponse200Item: + """ + Attributes: + type (Union[Unset, ListJobsResponse200ItemType]): + """ + + type: Union[Unset, ListJobsResponse200ItemType] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, ListJobsResponse200ItemType] + if isinstance(_type, Unset): + type = UNSET + else: + type = ListJobsResponse200ItemType(_type) + + list_jobs_response_200_item = cls( + type=type, + ) + + list_jobs_response_200_item.additional_properties = d + return list_jobs_response_200_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_jobs_response_200_item_type.py b/python-client/windmill-api/windmill_api/models/list_jobs_response_200_item_type.py new file mode 100644 index 0000000000..b1c63508ca --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_jobs_response_200_item_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ListJobsResponse200ItemType(str, Enum): + COMPLETEDJOB = "CompletedJob" + QUEUEDJOB = "QueuedJob" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_pending_invites_response_200_item.py b/python-client/windmill-api/windmill_api/models/list_pending_invites_response_200_item.py new file mode 100644 index 0000000000..8565bfaaed --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_pending_invites_response_200_item.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ListPendingInvitesResponse200Item") + + +@attr.s(auto_attribs=True) +class ListPendingInvitesResponse200Item: + """ + Attributes: + workspace_id (str): + email (str): + is_admin (bool): + """ + + workspace_id: str + email: str + is_admin: bool + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + workspace_id = self.workspace_id + email = self.email + is_admin = self.is_admin + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "workspace_id": workspace_id, + "email": email, + "is_admin": is_admin, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + workspace_id = d.pop("workspace_id") + + email = d.pop("email") + + is_admin = d.pop("is_admin") + + list_pending_invites_response_200_item = cls( + workspace_id=workspace_id, + email=email, + is_admin=is_admin, + ) + + list_pending_invites_response_200_item.additional_properties = d + return list_pending_invites_response_200_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item.py new file mode 100644 index 0000000000..fef973400c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item.py @@ -0,0 +1,310 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.list_queue_response_200_item_args import ListQueueResponse200ItemArgs +from ..models.list_queue_response_200_item_flow_status import ListQueueResponse200ItemFlowStatus +from ..models.list_queue_response_200_item_job_kind import ListQueueResponse200ItemJobKind +from ..models.list_queue_response_200_item_language import ListQueueResponse200ItemLanguage +from ..models.list_queue_response_200_item_raw_flow import ListQueueResponse200ItemRawFlow +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200Item") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200Item: + """ + Attributes: + id (str): + running (bool): + canceled (bool): + job_kind (ListQueueResponse200ItemJobKind): + permissioned_as (str): The user (u/userfoo) or group (g/groupfoo) whom + the execution of this script will be permissioned_as and by extension its DT_TOKEN. + is_flow_step (bool): + workspace_id (Union[Unset, str]): + parent_job (Union[Unset, str]): + created_by (Union[Unset, str]): + created_at (Union[Unset, datetime.datetime]): + started_at (Union[Unset, datetime.datetime]): + scheduled_for (Union[Unset, datetime.datetime]): + script_path (Union[Unset, str]): + script_hash (Union[Unset, str]): + args (Union[Unset, ListQueueResponse200ItemArgs]): + logs (Union[Unset, str]): + raw_code (Union[Unset, str]): + canceled_by (Union[Unset, str]): + canceled_reason (Union[Unset, str]): + last_ping (Union[Unset, datetime.datetime]): + schedule_path (Union[Unset, str]): + flow_status (Union[Unset, ListQueueResponse200ItemFlowStatus]): + raw_flow (Union[Unset, ListQueueResponse200ItemRawFlow]): + language (Union[Unset, ListQueueResponse200ItemLanguage]): + """ + + id: str + running: bool + canceled: bool + job_kind: ListQueueResponse200ItemJobKind + permissioned_as: str + is_flow_step: bool + workspace_id: Union[Unset, str] = UNSET + parent_job: Union[Unset, str] = UNSET + created_by: Union[Unset, str] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + scheduled_for: Union[Unset, datetime.datetime] = UNSET + script_path: Union[Unset, str] = UNSET + script_hash: Union[Unset, str] = UNSET + args: Union[Unset, ListQueueResponse200ItemArgs] = UNSET + logs: Union[Unset, str] = UNSET + raw_code: Union[Unset, str] = UNSET + canceled_by: Union[Unset, str] = UNSET + canceled_reason: Union[Unset, str] = UNSET + last_ping: Union[Unset, datetime.datetime] = UNSET + schedule_path: Union[Unset, str] = UNSET + flow_status: Union[Unset, ListQueueResponse200ItemFlowStatus] = UNSET + raw_flow: Union[Unset, ListQueueResponse200ItemRawFlow] = UNSET + language: Union[Unset, ListQueueResponse200ItemLanguage] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + running = self.running + canceled = self.canceled + job_kind = self.job_kind.value + + permissioned_as = self.permissioned_as + is_flow_step = self.is_flow_step + workspace_id = self.workspace_id + parent_job = self.parent_job + created_by = self.created_by + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + + scheduled_for: Union[Unset, str] = UNSET + if not isinstance(self.scheduled_for, Unset): + scheduled_for = self.scheduled_for.isoformat() + + script_path = self.script_path + script_hash = self.script_hash + args: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.args, Unset): + args = self.args.to_dict() + + logs = self.logs + raw_code = self.raw_code + canceled_by = self.canceled_by + canceled_reason = self.canceled_reason + last_ping: Union[Unset, str] = UNSET + if not isinstance(self.last_ping, Unset): + last_ping = self.last_ping.isoformat() + + schedule_path = self.schedule_path + flow_status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.flow_status, Unset): + flow_status = self.flow_status.to_dict() + + raw_flow: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.raw_flow, Unset): + raw_flow = self.raw_flow.to_dict() + + language: Union[Unset, str] = UNSET + if not isinstance(self.language, Unset): + language = self.language.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "running": running, + "canceled": canceled, + "job_kind": job_kind, + "permissioned_as": permissioned_as, + "is_flow_step": is_flow_step, + } + ) + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if parent_job is not UNSET: + field_dict["parent_job"] = parent_job + if created_by is not UNSET: + field_dict["created_by"] = created_by + if created_at is not UNSET: + field_dict["created_at"] = created_at + if started_at is not UNSET: + field_dict["started_at"] = started_at + if scheduled_for is not UNSET: + field_dict["scheduled_for"] = scheduled_for + if script_path is not UNSET: + field_dict["script_path"] = script_path + if script_hash is not UNSET: + field_dict["script_hash"] = script_hash + if args is not UNSET: + field_dict["args"] = args + if logs is not UNSET: + field_dict["logs"] = logs + if raw_code is not UNSET: + field_dict["raw_code"] = raw_code + if canceled_by is not UNSET: + field_dict["canceled_by"] = canceled_by + if canceled_reason is not UNSET: + field_dict["canceled_reason"] = canceled_reason + if last_ping is not UNSET: + field_dict["last_ping"] = last_ping + if schedule_path is not UNSET: + field_dict["schedule_path"] = schedule_path + if flow_status is not UNSET: + field_dict["flow_status"] = flow_status + if raw_flow is not UNSET: + field_dict["raw_flow"] = raw_flow + if language is not UNSET: + field_dict["language"] = language + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id") + + running = d.pop("running") + + canceled = d.pop("canceled") + + job_kind = ListQueueResponse200ItemJobKind(d.pop("job_kind")) + + permissioned_as = d.pop("permissioned_as") + + is_flow_step = d.pop("is_flow_step") + + workspace_id = d.pop("workspace_id", UNSET) + + parent_job = d.pop("parent_job", UNSET) + + created_by = d.pop("created_by", UNSET) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _scheduled_for = d.pop("scheduled_for", UNSET) + scheduled_for: Union[Unset, datetime.datetime] + if isinstance(_scheduled_for, Unset): + scheduled_for = UNSET + else: + scheduled_for = isoparse(_scheduled_for) + + script_path = d.pop("script_path", UNSET) + + script_hash = d.pop("script_hash", UNSET) + + _args = d.pop("args", UNSET) + args: Union[Unset, ListQueueResponse200ItemArgs] + if isinstance(_args, Unset): + args = UNSET + else: + args = ListQueueResponse200ItemArgs.from_dict(_args) + + logs = d.pop("logs", UNSET) + + raw_code = d.pop("raw_code", UNSET) + + canceled_by = d.pop("canceled_by", UNSET) + + canceled_reason = d.pop("canceled_reason", UNSET) + + _last_ping = d.pop("last_ping", UNSET) + last_ping: Union[Unset, datetime.datetime] + if isinstance(_last_ping, Unset): + last_ping = UNSET + else: + last_ping = isoparse(_last_ping) + + schedule_path = d.pop("schedule_path", UNSET) + + _flow_status = d.pop("flow_status", UNSET) + flow_status: Union[Unset, ListQueueResponse200ItemFlowStatus] + if isinstance(_flow_status, Unset): + flow_status = UNSET + else: + flow_status = ListQueueResponse200ItemFlowStatus.from_dict(_flow_status) + + _raw_flow = d.pop("raw_flow", UNSET) + raw_flow: Union[Unset, ListQueueResponse200ItemRawFlow] + if isinstance(_raw_flow, Unset): + raw_flow = UNSET + else: + raw_flow = ListQueueResponse200ItemRawFlow.from_dict(_raw_flow) + + _language = d.pop("language", UNSET) + language: Union[Unset, ListQueueResponse200ItemLanguage] + if isinstance(_language, Unset): + language = UNSET + else: + language = ListQueueResponse200ItemLanguage(_language) + + list_queue_response_200_item = cls( + id=id, + running=running, + canceled=canceled, + job_kind=job_kind, + permissioned_as=permissioned_as, + is_flow_step=is_flow_step, + workspace_id=workspace_id, + parent_job=parent_job, + created_by=created_by, + created_at=created_at, + started_at=started_at, + scheduled_for=scheduled_for, + script_path=script_path, + script_hash=script_hash, + args=args, + logs=logs, + raw_code=raw_code, + canceled_by=canceled_by, + canceled_reason=canceled_reason, + last_ping=last_ping, + schedule_path=schedule_path, + flow_status=flow_status, + raw_flow=raw_flow, + language=language, + ) + + list_queue_response_200_item.additional_properties = d + return list_queue_response_200_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_args.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_args.py new file mode 100644 index 0000000000..523f3e6a35 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_args.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ListQueueResponse200ItemArgs") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemArgs: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + list_queue_response_200_item_args = cls() + + list_queue_response_200_item_args.additional_properties = d + return list_queue_response_200_item_args + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status.py new file mode 100644 index 0000000000..188e970432 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status.py @@ -0,0 +1,104 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_queue_response_200_item_flow_status_failure_module import ( + ListQueueResponse200ItemFlowStatusFailureModule, +) +from ..models.list_queue_response_200_item_flow_status_modules_item import ListQueueResponse200ItemFlowStatusModulesItem +from ..models.list_queue_response_200_item_flow_status_retry import ListQueueResponse200ItemFlowStatusRetry +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemFlowStatus") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemFlowStatus: + """ + Attributes: + step (int): + modules (List[ListQueueResponse200ItemFlowStatusModulesItem]): + failure_module (ListQueueResponse200ItemFlowStatusFailureModule): + retry (Union[Unset, ListQueueResponse200ItemFlowStatusRetry]): + """ + + step: int + modules: List[ListQueueResponse200ItemFlowStatusModulesItem] + failure_module: ListQueueResponse200ItemFlowStatusFailureModule + retry: Union[Unset, ListQueueResponse200ItemFlowStatusRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + step = self.step + modules = [] + for modules_item_data in self.modules: + modules_item = modules_item_data.to_dict() + + modules.append(modules_item) + + failure_module = self.failure_module.to_dict() + + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "step": step, + "modules": modules, + "failure_module": failure_module, + } + ) + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + step = d.pop("step") + + modules = [] + _modules = d.pop("modules") + for modules_item_data in _modules: + modules_item = ListQueueResponse200ItemFlowStatusModulesItem.from_dict(modules_item_data) + + modules.append(modules_item) + + failure_module = ListQueueResponse200ItemFlowStatusFailureModule.from_dict(d.pop("failure_module")) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, ListQueueResponse200ItemFlowStatusRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = ListQueueResponse200ItemFlowStatusRetry.from_dict(_retry) + + list_queue_response_200_item_flow_status = cls( + step=step, + modules=modules, + failure_module=failure_module, + retry=retry, + ) + + list_queue_response_200_item_flow_status.additional_properties = d + return list_queue_response_200_item_flow_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_failure_module.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_failure_module.py new file mode 100644 index 0000000000..a98acc658a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_failure_module.py @@ -0,0 +1,108 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.list_queue_response_200_item_flow_status_failure_module_iterator import ( + ListQueueResponse200ItemFlowStatusFailureModuleIterator, +) +from ..models.list_queue_response_200_item_flow_status_failure_module_type import ( + ListQueueResponse200ItemFlowStatusFailureModuleType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemFlowStatusFailureModule") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemFlowStatusFailureModule: + """ + Attributes: + type (ListQueueResponse200ItemFlowStatusFailureModuleType): + job (Union[Unset, str]): + count (Union[Unset, int]): + iterator (Union[Unset, ListQueueResponse200ItemFlowStatusFailureModuleIterator]): + forloop_jobs (Union[Unset, List[str]]): + """ + + type: ListQueueResponse200ItemFlowStatusFailureModuleType + job: Union[Unset, str] = UNSET + count: Union[Unset, int] = UNSET + iterator: Union[Unset, ListQueueResponse200ItemFlowStatusFailureModuleIterator] = UNSET + forloop_jobs: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + job = self.job + count = self.count + iterator: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.iterator, Unset): + iterator = self.iterator.to_dict() + + forloop_jobs: Union[Unset, List[str]] = UNSET + if not isinstance(self.forloop_jobs, Unset): + forloop_jobs = self.forloop_jobs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if job is not UNSET: + field_dict["job"] = job + if count is not UNSET: + field_dict["count"] = count + if iterator is not UNSET: + field_dict["iterator"] = iterator + if forloop_jobs is not UNSET: + field_dict["forloop_jobs"] = forloop_jobs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListQueueResponse200ItemFlowStatusFailureModuleType(d.pop("type")) + + job = d.pop("job", UNSET) + + count = d.pop("count", UNSET) + + _iterator = d.pop("iterator", UNSET) + iterator: Union[Unset, ListQueueResponse200ItemFlowStatusFailureModuleIterator] + if isinstance(_iterator, Unset): + iterator = UNSET + else: + iterator = ListQueueResponse200ItemFlowStatusFailureModuleIterator.from_dict(_iterator) + + forloop_jobs = cast(List[str], d.pop("forloop_jobs", UNSET)) + + list_queue_response_200_item_flow_status_failure_module = cls( + type=type, + job=job, + count=count, + iterator=iterator, + forloop_jobs=forloop_jobs, + ) + + list_queue_response_200_item_flow_status_failure_module.additional_properties = d + return list_queue_response_200_item_flow_status_failure_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_failure_module_iterator.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_failure_module_iterator.py new file mode 100644 index 0000000000..407c1f3767 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_failure_module_iterator.py @@ -0,0 +1,76 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemFlowStatusFailureModuleIterator") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemFlowStatusFailureModuleIterator: + """ + Attributes: + index (Union[Unset, int]): + itered (Union[Unset, List[Any]]): + args (Union[Unset, Any]): + """ + + index: Union[Unset, int] = UNSET + itered: Union[Unset, List[Any]] = UNSET + args: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + index = self.index + itered: Union[Unset, List[Any]] = UNSET + if not isinstance(self.itered, Unset): + itered = self.itered + + args = self.args + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if index is not UNSET: + field_dict["index"] = index + if itered is not UNSET: + field_dict["itered"] = itered + if args is not UNSET: + field_dict["args"] = args + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + index = d.pop("index", UNSET) + + itered = cast(List[Any], d.pop("itered", UNSET)) + + args = d.pop("args", UNSET) + + list_queue_response_200_item_flow_status_failure_module_iterator = cls( + index=index, + itered=itered, + args=args, + ) + + list_queue_response_200_item_flow_status_failure_module_iterator.additional_properties = d + return list_queue_response_200_item_flow_status_failure_module_iterator + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_failure_module_type.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_failure_module_type.py new file mode 100644 index 0000000000..4f6f99cb9a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_failure_module_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class ListQueueResponse200ItemFlowStatusFailureModuleType(str, Enum): + WAITINGFORPRIORSTEPS = "WaitingForPriorSteps" + WAITINGFOREVENT = "WaitingForEvent" + WAITINGFOREXECUTOR = "WaitingForExecutor" + INPROGRESS = "InProgress" + SUCCESS = "Success" + FAILURE = "Failure" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_modules_item.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_modules_item.py new file mode 100644 index 0000000000..6831412763 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_modules_item.py @@ -0,0 +1,108 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.list_queue_response_200_item_flow_status_modules_item_iterator import ( + ListQueueResponse200ItemFlowStatusModulesItemIterator, +) +from ..models.list_queue_response_200_item_flow_status_modules_item_type import ( + ListQueueResponse200ItemFlowStatusModulesItemType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemFlowStatusModulesItem") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemFlowStatusModulesItem: + """ + Attributes: + type (ListQueueResponse200ItemFlowStatusModulesItemType): + job (Union[Unset, str]): + count (Union[Unset, int]): + iterator (Union[Unset, ListQueueResponse200ItemFlowStatusModulesItemIterator]): + forloop_jobs (Union[Unset, List[str]]): + """ + + type: ListQueueResponse200ItemFlowStatusModulesItemType + job: Union[Unset, str] = UNSET + count: Union[Unset, int] = UNSET + iterator: Union[Unset, ListQueueResponse200ItemFlowStatusModulesItemIterator] = UNSET + forloop_jobs: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + job = self.job + count = self.count + iterator: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.iterator, Unset): + iterator = self.iterator.to_dict() + + forloop_jobs: Union[Unset, List[str]] = UNSET + if not isinstance(self.forloop_jobs, Unset): + forloop_jobs = self.forloop_jobs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if job is not UNSET: + field_dict["job"] = job + if count is not UNSET: + field_dict["count"] = count + if iterator is not UNSET: + field_dict["iterator"] = iterator + if forloop_jobs is not UNSET: + field_dict["forloop_jobs"] = forloop_jobs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListQueueResponse200ItemFlowStatusModulesItemType(d.pop("type")) + + job = d.pop("job", UNSET) + + count = d.pop("count", UNSET) + + _iterator = d.pop("iterator", UNSET) + iterator: Union[Unset, ListQueueResponse200ItemFlowStatusModulesItemIterator] + if isinstance(_iterator, Unset): + iterator = UNSET + else: + iterator = ListQueueResponse200ItemFlowStatusModulesItemIterator.from_dict(_iterator) + + forloop_jobs = cast(List[str], d.pop("forloop_jobs", UNSET)) + + list_queue_response_200_item_flow_status_modules_item = cls( + type=type, + job=job, + count=count, + iterator=iterator, + forloop_jobs=forloop_jobs, + ) + + list_queue_response_200_item_flow_status_modules_item.additional_properties = d + return list_queue_response_200_item_flow_status_modules_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_modules_item_iterator.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_modules_item_iterator.py new file mode 100644 index 0000000000..9b0b7c8b90 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_modules_item_iterator.py @@ -0,0 +1,76 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemFlowStatusModulesItemIterator") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemFlowStatusModulesItemIterator: + """ + Attributes: + index (Union[Unset, int]): + itered (Union[Unset, List[Any]]): + args (Union[Unset, Any]): + """ + + index: Union[Unset, int] = UNSET + itered: Union[Unset, List[Any]] = UNSET + args: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + index = self.index + itered: Union[Unset, List[Any]] = UNSET + if not isinstance(self.itered, Unset): + itered = self.itered + + args = self.args + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if index is not UNSET: + field_dict["index"] = index + if itered is not UNSET: + field_dict["itered"] = itered + if args is not UNSET: + field_dict["args"] = args + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + index = d.pop("index", UNSET) + + itered = cast(List[Any], d.pop("itered", UNSET)) + + args = d.pop("args", UNSET) + + list_queue_response_200_item_flow_status_modules_item_iterator = cls( + index=index, + itered=itered, + args=args, + ) + + list_queue_response_200_item_flow_status_modules_item_iterator.additional_properties = d + return list_queue_response_200_item_flow_status_modules_item_iterator + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_modules_item_type.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_modules_item_type.py new file mode 100644 index 0000000000..945453a898 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_modules_item_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class ListQueueResponse200ItemFlowStatusModulesItemType(str, Enum): + WAITINGFORPRIORSTEPS = "WaitingForPriorSteps" + WAITINGFOREVENT = "WaitingForEvent" + WAITINGFOREXECUTOR = "WaitingForExecutor" + INPROGRESS = "InProgress" + SUCCESS = "Success" + FAILURE = "Failure" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_retry.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_retry.py new file mode 100644 index 0000000000..2f6a12ae30 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_flow_status_retry.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemFlowStatusRetry") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemFlowStatusRetry: + """ + Attributes: + fail_count (Union[Unset, int]): + """ + + fail_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + fail_count = self.fail_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if fail_count is not UNSET: + field_dict["fail_count"] = fail_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + fail_count = d.pop("fail_count", UNSET) + + list_queue_response_200_item_flow_status_retry = cls( + fail_count=fail_count, + ) + + list_queue_response_200_item_flow_status_retry.additional_properties = d + return list_queue_response_200_item_flow_status_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_job_kind.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_job_kind.py new file mode 100644 index 0000000000..6c8375c487 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_job_kind.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class ListQueueResponse200ItemJobKind(str, Enum): + SCRIPT = "script" + PREVIEW = "preview" + DEPENDENCIES = "dependencies" + FLOW = "flow" + FLOWPREVIEW = "flowpreview" + SCRIPT_HUB = "script_hub" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_language.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_language.py new file mode 100644 index 0000000000..48a704270b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ListQueueResponse200ItemLanguage(str, Enum): + PYTHON3 = "python3" + DENO = "deno" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow.py new file mode 100644 index 0000000000..07d513f763 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow.py @@ -0,0 +1,95 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_queue_response_200_item_raw_flow_failure_module import ListQueueResponse200ItemRawFlowFailureModule +from ..models.list_queue_response_200_item_raw_flow_modules_item import ListQueueResponse200ItemRawFlowModulesItem +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlow") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlow: + """ + Attributes: + modules (List[ListQueueResponse200ItemRawFlowModulesItem]): + failure_module (Union[Unset, ListQueueResponse200ItemRawFlowFailureModule]): + same_worker (Union[Unset, bool]): + """ + + modules: List[ListQueueResponse200ItemRawFlowModulesItem] + failure_module: Union[Unset, ListQueueResponse200ItemRawFlowFailureModule] = UNSET + same_worker: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + modules = [] + for modules_item_data in self.modules: + modules_item = modules_item_data.to_dict() + + modules.append(modules_item) + + failure_module: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.failure_module, Unset): + failure_module = self.failure_module.to_dict() + + same_worker = self.same_worker + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "modules": modules, + } + ) + if failure_module is not UNSET: + field_dict["failure_module"] = failure_module + if same_worker is not UNSET: + field_dict["same_worker"] = same_worker + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + modules = [] + _modules = d.pop("modules") + for modules_item_data in _modules: + modules_item = ListQueueResponse200ItemRawFlowModulesItem.from_dict(modules_item_data) + + modules.append(modules_item) + + _failure_module = d.pop("failure_module", UNSET) + failure_module: Union[Unset, ListQueueResponse200ItemRawFlowFailureModule] + if isinstance(_failure_module, Unset): + failure_module = UNSET + else: + failure_module = ListQueueResponse200ItemRawFlowFailureModule.from_dict(_failure_module) + + same_worker = d.pop("same_worker", UNSET) + + list_queue_response_200_item_raw_flow = cls( + modules=modules, + failure_module=failure_module, + same_worker=same_worker, + ) + + list_queue_response_200_item_raw_flow.additional_properties = d + return list_queue_response_200_item_raw_flow + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module.py new file mode 100644 index 0000000000..418cacb1db --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module.py @@ -0,0 +1,258 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_queue_response_200_item_raw_flow_failure_module_input_transforms import ( + ListQueueResponse200ItemRawFlowFailureModuleInputTransforms, +) +from ..models.list_queue_response_200_item_raw_flow_failure_module_retry import ( + ListQueueResponse200ItemRawFlowFailureModuleRetry, +) +from ..models.list_queue_response_200_item_raw_flow_failure_module_sleep_type_0 import ( + ListQueueResponse200ItemRawFlowFailureModuleSleepType0, +) +from ..models.list_queue_response_200_item_raw_flow_failure_module_sleep_type_1 import ( + ListQueueResponse200ItemRawFlowFailureModuleSleepType1, +) +from ..models.list_queue_response_200_item_raw_flow_failure_module_stop_after_if import ( + ListQueueResponse200ItemRawFlowFailureModuleStopAfterIf, +) +from ..models.list_queue_response_200_item_raw_flow_failure_module_value_type_0 import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType0, +) +from ..models.list_queue_response_200_item_raw_flow_failure_module_value_type_1 import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType1, +) +from ..models.list_queue_response_200_item_raw_flow_failure_module_value_type_2 import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType2, +) +from ..models.list_queue_response_200_item_raw_flow_failure_module_value_type_3 import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType3, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowFailureModule") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowFailureModule: + """ + Attributes: + input_transforms (ListQueueResponse200ItemRawFlowFailureModuleInputTransforms): + value (Union[ListQueueResponse200ItemRawFlowFailureModuleValueType0, + ListQueueResponse200ItemRawFlowFailureModuleValueType1, ListQueueResponse200ItemRawFlowFailureModuleValueType2, + ListQueueResponse200ItemRawFlowFailureModuleValueType3]): + stop_after_if (Union[Unset, ListQueueResponse200ItemRawFlowFailureModuleStopAfterIf]): + sleep (Union[ListQueueResponse200ItemRawFlowFailureModuleSleepType0, + ListQueueResponse200ItemRawFlowFailureModuleSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, ListQueueResponse200ItemRawFlowFailureModuleRetry]): + """ + + input_transforms: ListQueueResponse200ItemRawFlowFailureModuleInputTransforms + value: Union[ + ListQueueResponse200ItemRawFlowFailureModuleValueType0, + ListQueueResponse200ItemRawFlowFailureModuleValueType1, + ListQueueResponse200ItemRawFlowFailureModuleValueType2, + ListQueueResponse200ItemRawFlowFailureModuleValueType3, + ] + stop_after_if: Union[Unset, ListQueueResponse200ItemRawFlowFailureModuleStopAfterIf] = UNSET + sleep: Union[ + ListQueueResponse200ItemRawFlowFailureModuleSleepType0, + ListQueueResponse200ItemRawFlowFailureModuleSleepType1, + Unset, + ] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, ListQueueResponse200ItemRawFlowFailureModuleRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, ListQueueResponse200ItemRawFlowFailureModuleValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, ListQueueResponse200ItemRawFlowFailureModuleValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, ListQueueResponse200ItemRawFlowFailureModuleValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, ListQueueResponse200ItemRawFlowFailureModuleSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = ListQueueResponse200ItemRawFlowFailureModuleInputTransforms.from_dict( + d.pop("input_transforms") + ) + + def _parse_value( + data: object, + ) -> Union[ + ListQueueResponse200ItemRawFlowFailureModuleValueType0, + ListQueueResponse200ItemRawFlowFailureModuleValueType1, + ListQueueResponse200ItemRawFlowFailureModuleValueType2, + ListQueueResponse200ItemRawFlowFailureModuleValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = ListQueueResponse200ItemRawFlowFailureModuleValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = ListQueueResponse200ItemRawFlowFailureModuleValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = ListQueueResponse200ItemRawFlowFailureModuleValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = ListQueueResponse200ItemRawFlowFailureModuleValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, ListQueueResponse200ItemRawFlowFailureModuleStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = ListQueueResponse200ItemRawFlowFailureModuleStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[ + ListQueueResponse200ItemRawFlowFailureModuleSleepType0, + ListQueueResponse200ItemRawFlowFailureModuleSleepType1, + Unset, + ]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, ListQueueResponse200ItemRawFlowFailureModuleSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = ListQueueResponse200ItemRawFlowFailureModuleSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, ListQueueResponse200ItemRawFlowFailureModuleSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = ListQueueResponse200ItemRawFlowFailureModuleSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, ListQueueResponse200ItemRawFlowFailureModuleRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = ListQueueResponse200ItemRawFlowFailureModuleRetry.from_dict(_retry) + + list_queue_response_200_item_raw_flow_failure_module = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + list_queue_response_200_item_raw_flow_failure_module.additional_properties = d + return list_queue_response_200_item_raw_flow_failure_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_input_transforms.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_input_transforms.py new file mode 100644 index 0000000000..21749629cd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_input_transforms.py @@ -0,0 +1,111 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0 import ( + ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0, +) +from ..models.list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1 import ( + ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowFailureModuleInputTransforms") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowFailureModuleInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0, + ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + list_queue_response_200_item_raw_flow_failure_module_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0, + ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0.from_dict( + data + ) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1.from_dict(data) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + list_queue_response_200_item_raw_flow_failure_module_input_transforms.additional_properties = ( + additional_properties + ) + return list_queue_response_200_item_raw_flow_failure_module_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0, + ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0, + ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..529d2afc4a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0_type import ( + ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0.additional_properties = ( + d + ) + return list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..0b9f46205e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..cc69856947 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1_type import ( + ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1.additional_properties = ( + d + ) + return list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..3ba2abe068 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListQueueResponse200ItemRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_retry.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_retry.py new file mode 100644 index 0000000000..3fffbb52fe --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_retry.py @@ -0,0 +1,86 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_queue_response_200_item_raw_flow_failure_module_retry_constant import ( + ListQueueResponse200ItemRawFlowFailureModuleRetryConstant, +) +from ..models.list_queue_response_200_item_raw_flow_failure_module_retry_exponential import ( + ListQueueResponse200ItemRawFlowFailureModuleRetryExponential, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowFailureModuleRetry") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowFailureModuleRetry: + """ + Attributes: + constant (Union[Unset, ListQueueResponse200ItemRawFlowFailureModuleRetryConstant]): + exponential (Union[Unset, ListQueueResponse200ItemRawFlowFailureModuleRetryExponential]): + """ + + constant: Union[Unset, ListQueueResponse200ItemRawFlowFailureModuleRetryConstant] = UNSET + exponential: Union[Unset, ListQueueResponse200ItemRawFlowFailureModuleRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, ListQueueResponse200ItemRawFlowFailureModuleRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = ListQueueResponse200ItemRawFlowFailureModuleRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, ListQueueResponse200ItemRawFlowFailureModuleRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = ListQueueResponse200ItemRawFlowFailureModuleRetryExponential.from_dict(_exponential) + + list_queue_response_200_item_raw_flow_failure_module_retry = cls( + constant=constant, + exponential=exponential, + ) + + list_queue_response_200_item_raw_flow_failure_module_retry.additional_properties = d + return list_queue_response_200_item_raw_flow_failure_module_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_retry_constant.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_retry_constant.py new file mode 100644 index 0000000000..877f9efdfd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowFailureModuleRetryConstant") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowFailureModuleRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + list_queue_response_200_item_raw_flow_failure_module_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + list_queue_response_200_item_raw_flow_failure_module_retry_constant.additional_properties = d + return list_queue_response_200_item_raw_flow_failure_module_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_retry_exponential.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_retry_exponential.py new file mode 100644 index 0000000000..58c646753e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowFailureModuleRetryExponential") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowFailureModuleRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + list_queue_response_200_item_raw_flow_failure_module_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + list_queue_response_200_item_raw_flow_failure_module_retry_exponential.additional_properties = d + return list_queue_response_200_item_raw_flow_failure_module_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_sleep_type_0.py new file mode 100644 index 0000000000..5cf86bbeaf --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_sleep_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_queue_response_200_item_raw_flow_failure_module_sleep_type_0_type import ( + ListQueueResponse200ItemRawFlowFailureModuleSleepType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowFailureModuleSleepType0") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowFailureModuleSleepType0: + """ + Attributes: + type (ListQueueResponse200ItemRawFlowFailureModuleSleepType0Type): + value (Union[Unset, Any]): + """ + + type: ListQueueResponse200ItemRawFlowFailureModuleSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListQueueResponse200ItemRawFlowFailureModuleSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + list_queue_response_200_item_raw_flow_failure_module_sleep_type_0 = cls( + type=type, + value=value, + ) + + list_queue_response_200_item_raw_flow_failure_module_sleep_type_0.additional_properties = d + return list_queue_response_200_item_raw_flow_failure_module_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_sleep_type_0_type.py new file mode 100644 index 0000000000..f3d82986a9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListQueueResponse200ItemRawFlowFailureModuleSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_sleep_type_1.py new file mode 100644 index 0000000000..56e869b607 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_sleep_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_queue_response_200_item_raw_flow_failure_module_sleep_type_1_type import ( + ListQueueResponse200ItemRawFlowFailureModuleSleepType1Type, +) + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowFailureModuleSleepType1") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowFailureModuleSleepType1: + """ + Attributes: + expr (str): + type (ListQueueResponse200ItemRawFlowFailureModuleSleepType1Type): + """ + + expr: str + type: ListQueueResponse200ItemRawFlowFailureModuleSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = ListQueueResponse200ItemRawFlowFailureModuleSleepType1Type(d.pop("type")) + + list_queue_response_200_item_raw_flow_failure_module_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + list_queue_response_200_item_raw_flow_failure_module_sleep_type_1.additional_properties = d + return list_queue_response_200_item_raw_flow_failure_module_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_sleep_type_1_type.py new file mode 100644 index 0000000000..c06aa24cb4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListQueueResponse200ItemRawFlowFailureModuleSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_stop_after_if.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_stop_after_if.py new file mode 100644 index 0000000000..6ce2395c62 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowFailureModuleStopAfterIf") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowFailureModuleStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + list_queue_response_200_item_raw_flow_failure_module_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + list_queue_response_200_item_raw_flow_failure_module_stop_after_if.additional_properties = d + return list_queue_response_200_item_raw_flow_failure_module_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_0.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_0.py new file mode 100644 index 0000000000..0e7362c33a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_queue_response_200_item_raw_flow_failure_module_value_type_0_language import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowFailureModuleValueType0") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowFailureModuleValueType0: + """ + Attributes: + content (str): + language (ListQueueResponse200ItemRawFlowFailureModuleValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: ListQueueResponse200ItemRawFlowFailureModuleValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = ListQueueResponse200ItemRawFlowFailureModuleValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + list_queue_response_200_item_raw_flow_failure_module_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + list_queue_response_200_item_raw_flow_failure_module_value_type_0.additional_properties = d + return list_queue_response_200_item_raw_flow_failure_module_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_0_language.py new file mode 100644 index 0000000000..02f7366a17 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ListQueueResponse200ItemRawFlowFailureModuleValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_1.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_1.py new file mode 100644 index 0000000000..2fe4d1ae15 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_queue_response_200_item_raw_flow_failure_module_value_type_1_type import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType1Type, +) + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowFailureModuleValueType1") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowFailureModuleValueType1: + """ + Attributes: + path (str): + type (ListQueueResponse200ItemRawFlowFailureModuleValueType1Type): + """ + + path: str + type: ListQueueResponse200ItemRawFlowFailureModuleValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = ListQueueResponse200ItemRawFlowFailureModuleValueType1Type(d.pop("type")) + + list_queue_response_200_item_raw_flow_failure_module_value_type_1 = cls( + path=path, + type=type, + ) + + list_queue_response_200_item_raw_flow_failure_module_value_type_1.additional_properties = d + return list_queue_response_200_item_raw_flow_failure_module_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_1_type.py new file mode 100644 index 0000000000..2f6a8945f0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListQueueResponse200ItemRawFlowFailureModuleValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2.py new file mode 100644 index 0000000000..1bae73dfe3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2.py @@ -0,0 +1,112 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0 import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType0, +) +from ..models.list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1 import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType1, +) +from ..models.list_queue_response_200_item_raw_flow_failure_module_value_type_2_type import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType2Type, +) + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowFailureModuleValueType2") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowFailureModuleValueType2: + """ + Attributes: + iterator (Union[ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType0, + ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType1]): + skip_failures (bool): + type (ListQueueResponse200ItemRawFlowFailureModuleValueType2Type): + """ + + iterator: Union[ + ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType0, + ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType1, + ] + skip_failures: bool + type: ListQueueResponse200ItemRawFlowFailureModuleValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType0, + ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = ListQueueResponse200ItemRawFlowFailureModuleValueType2Type(d.pop("type")) + + list_queue_response_200_item_raw_flow_failure_module_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + list_queue_response_200_item_raw_flow_failure_module_value_type_2.additional_properties = d + return list_queue_response_200_item_raw_flow_failure_module_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..15eca1d32d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0_type import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType0: + """ + Attributes: + type (ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0.additional_properties = d + return list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..cb4c54032d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..b66609208b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1_type import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType1: + """ + Attributes: + expr (str): + type (ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType1Type): + """ + + expr: str + type: ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType1Type(d.pop("type")) + + list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1.additional_properties = d + return list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..185a3760cb --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListQueueResponse200ItemRawFlowFailureModuleValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2_type.py new file mode 100644 index 0000000000..b79ab4914e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListQueueResponse200ItemRawFlowFailureModuleValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_3.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_3.py new file mode 100644 index 0000000000..c0ed90a71d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_3.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_queue_response_200_item_raw_flow_failure_module_value_type_3_type import ( + ListQueueResponse200ItemRawFlowFailureModuleValueType3Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowFailureModuleValueType3") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowFailureModuleValueType3: + """ + Attributes: + type (ListQueueResponse200ItemRawFlowFailureModuleValueType3Type): + path (Union[Unset, str]): + """ + + type: ListQueueResponse200ItemRawFlowFailureModuleValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListQueueResponse200ItemRawFlowFailureModuleValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + list_queue_response_200_item_raw_flow_failure_module_value_type_3 = cls( + type=type, + path=path, + ) + + list_queue_response_200_item_raw_flow_failure_module_value_type_3.additional_properties = d + return list_queue_response_200_item_raw_flow_failure_module_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_3_type.py new file mode 100644 index 0000000000..c616f3cdcd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_failure_module_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListQueueResponse200ItemRawFlowFailureModuleValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item.py new file mode 100644 index 0000000000..600f05f1b3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item.py @@ -0,0 +1,258 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_queue_response_200_item_raw_flow_modules_item_input_transforms import ( + ListQueueResponse200ItemRawFlowModulesItemInputTransforms, +) +from ..models.list_queue_response_200_item_raw_flow_modules_item_retry import ( + ListQueueResponse200ItemRawFlowModulesItemRetry, +) +from ..models.list_queue_response_200_item_raw_flow_modules_item_sleep_type_0 import ( + ListQueueResponse200ItemRawFlowModulesItemSleepType0, +) +from ..models.list_queue_response_200_item_raw_flow_modules_item_sleep_type_1 import ( + ListQueueResponse200ItemRawFlowModulesItemSleepType1, +) +from ..models.list_queue_response_200_item_raw_flow_modules_item_stop_after_if import ( + ListQueueResponse200ItemRawFlowModulesItemStopAfterIf, +) +from ..models.list_queue_response_200_item_raw_flow_modules_item_value_type_0 import ( + ListQueueResponse200ItemRawFlowModulesItemValueType0, +) +from ..models.list_queue_response_200_item_raw_flow_modules_item_value_type_1 import ( + ListQueueResponse200ItemRawFlowModulesItemValueType1, +) +from ..models.list_queue_response_200_item_raw_flow_modules_item_value_type_2 import ( + ListQueueResponse200ItemRawFlowModulesItemValueType2, +) +from ..models.list_queue_response_200_item_raw_flow_modules_item_value_type_3 import ( + ListQueueResponse200ItemRawFlowModulesItemValueType3, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowModulesItem") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowModulesItem: + """ + Attributes: + input_transforms (ListQueueResponse200ItemRawFlowModulesItemInputTransforms): + value (Union[ListQueueResponse200ItemRawFlowModulesItemValueType0, + ListQueueResponse200ItemRawFlowModulesItemValueType1, ListQueueResponse200ItemRawFlowModulesItemValueType2, + ListQueueResponse200ItemRawFlowModulesItemValueType3]): + stop_after_if (Union[Unset, ListQueueResponse200ItemRawFlowModulesItemStopAfterIf]): + sleep (Union[ListQueueResponse200ItemRawFlowModulesItemSleepType0, + ListQueueResponse200ItemRawFlowModulesItemSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, ListQueueResponse200ItemRawFlowModulesItemRetry]): + """ + + input_transforms: ListQueueResponse200ItemRawFlowModulesItemInputTransforms + value: Union[ + ListQueueResponse200ItemRawFlowModulesItemValueType0, + ListQueueResponse200ItemRawFlowModulesItemValueType1, + ListQueueResponse200ItemRawFlowModulesItemValueType2, + ListQueueResponse200ItemRawFlowModulesItemValueType3, + ] + stop_after_if: Union[Unset, ListQueueResponse200ItemRawFlowModulesItemStopAfterIf] = UNSET + sleep: Union[ + ListQueueResponse200ItemRawFlowModulesItemSleepType0, + ListQueueResponse200ItemRawFlowModulesItemSleepType1, + Unset, + ] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, ListQueueResponse200ItemRawFlowModulesItemRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, ListQueueResponse200ItemRawFlowModulesItemValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, ListQueueResponse200ItemRawFlowModulesItemValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, ListQueueResponse200ItemRawFlowModulesItemValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, ListQueueResponse200ItemRawFlowModulesItemSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = ListQueueResponse200ItemRawFlowModulesItemInputTransforms.from_dict( + d.pop("input_transforms") + ) + + def _parse_value( + data: object, + ) -> Union[ + ListQueueResponse200ItemRawFlowModulesItemValueType0, + ListQueueResponse200ItemRawFlowModulesItemValueType1, + ListQueueResponse200ItemRawFlowModulesItemValueType2, + ListQueueResponse200ItemRawFlowModulesItemValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = ListQueueResponse200ItemRawFlowModulesItemValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = ListQueueResponse200ItemRawFlowModulesItemValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = ListQueueResponse200ItemRawFlowModulesItemValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = ListQueueResponse200ItemRawFlowModulesItemValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, ListQueueResponse200ItemRawFlowModulesItemStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = ListQueueResponse200ItemRawFlowModulesItemStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[ + ListQueueResponse200ItemRawFlowModulesItemSleepType0, + ListQueueResponse200ItemRawFlowModulesItemSleepType1, + Unset, + ]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, ListQueueResponse200ItemRawFlowModulesItemSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = ListQueueResponse200ItemRawFlowModulesItemSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, ListQueueResponse200ItemRawFlowModulesItemSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = ListQueueResponse200ItemRawFlowModulesItemSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, ListQueueResponse200ItemRawFlowModulesItemRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = ListQueueResponse200ItemRawFlowModulesItemRetry.from_dict(_retry) + + list_queue_response_200_item_raw_flow_modules_item = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + list_queue_response_200_item_raw_flow_modules_item.additional_properties = d + return list_queue_response_200_item_raw_flow_modules_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_input_transforms.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_input_transforms.py new file mode 100644 index 0000000000..e596cbdd64 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_input_transforms.py @@ -0,0 +1,109 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0 import ( + ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0, +) +from ..models.list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1 import ( + ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowModulesItemInputTransforms") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowModulesItemInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0, + ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + list_queue_response_200_item_raw_flow_modules_item_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0, + ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0.from_dict(data) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1.from_dict(data) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + list_queue_response_200_item_raw_flow_modules_item_input_transforms.additional_properties = ( + additional_properties + ) + return list_queue_response_200_item_raw_flow_modules_item_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0, + ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0, + ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..1d8634e143 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0_type import ( + ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0.additional_properties = ( + d + ) + return list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..504d109a34 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..43da941d8e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1_type import ( + ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1.additional_properties = ( + d + ) + return list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..68a70ad323 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListQueueResponse200ItemRawFlowModulesItemInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_retry.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_retry.py new file mode 100644 index 0000000000..3f6387b1c9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_retry.py @@ -0,0 +1,86 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_queue_response_200_item_raw_flow_modules_item_retry_constant import ( + ListQueueResponse200ItemRawFlowModulesItemRetryConstant, +) +from ..models.list_queue_response_200_item_raw_flow_modules_item_retry_exponential import ( + ListQueueResponse200ItemRawFlowModulesItemRetryExponential, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowModulesItemRetry") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowModulesItemRetry: + """ + Attributes: + constant (Union[Unset, ListQueueResponse200ItemRawFlowModulesItemRetryConstant]): + exponential (Union[Unset, ListQueueResponse200ItemRawFlowModulesItemRetryExponential]): + """ + + constant: Union[Unset, ListQueueResponse200ItemRawFlowModulesItemRetryConstant] = UNSET + exponential: Union[Unset, ListQueueResponse200ItemRawFlowModulesItemRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, ListQueueResponse200ItemRawFlowModulesItemRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = ListQueueResponse200ItemRawFlowModulesItemRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, ListQueueResponse200ItemRawFlowModulesItemRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = ListQueueResponse200ItemRawFlowModulesItemRetryExponential.from_dict(_exponential) + + list_queue_response_200_item_raw_flow_modules_item_retry = cls( + constant=constant, + exponential=exponential, + ) + + list_queue_response_200_item_raw_flow_modules_item_retry.additional_properties = d + return list_queue_response_200_item_raw_flow_modules_item_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_retry_constant.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_retry_constant.py new file mode 100644 index 0000000000..d2fe29a588 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowModulesItemRetryConstant") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowModulesItemRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + list_queue_response_200_item_raw_flow_modules_item_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + list_queue_response_200_item_raw_flow_modules_item_retry_constant.additional_properties = d + return list_queue_response_200_item_raw_flow_modules_item_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_retry_exponential.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_retry_exponential.py new file mode 100644 index 0000000000..50dabde5ea --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowModulesItemRetryExponential") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowModulesItemRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + list_queue_response_200_item_raw_flow_modules_item_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + list_queue_response_200_item_raw_flow_modules_item_retry_exponential.additional_properties = d + return list_queue_response_200_item_raw_flow_modules_item_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_sleep_type_0.py new file mode 100644 index 0000000000..d25746cdb4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_sleep_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_queue_response_200_item_raw_flow_modules_item_sleep_type_0_type import ( + ListQueueResponse200ItemRawFlowModulesItemSleepType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowModulesItemSleepType0") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowModulesItemSleepType0: + """ + Attributes: + type (ListQueueResponse200ItemRawFlowModulesItemSleepType0Type): + value (Union[Unset, Any]): + """ + + type: ListQueueResponse200ItemRawFlowModulesItemSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListQueueResponse200ItemRawFlowModulesItemSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + list_queue_response_200_item_raw_flow_modules_item_sleep_type_0 = cls( + type=type, + value=value, + ) + + list_queue_response_200_item_raw_flow_modules_item_sleep_type_0.additional_properties = d + return list_queue_response_200_item_raw_flow_modules_item_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_sleep_type_0_type.py new file mode 100644 index 0000000000..dfbf599eee --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListQueueResponse200ItemRawFlowModulesItemSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_sleep_type_1.py new file mode 100644 index 0000000000..47a8ecda0b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_sleep_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_queue_response_200_item_raw_flow_modules_item_sleep_type_1_type import ( + ListQueueResponse200ItemRawFlowModulesItemSleepType1Type, +) + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowModulesItemSleepType1") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowModulesItemSleepType1: + """ + Attributes: + expr (str): + type (ListQueueResponse200ItemRawFlowModulesItemSleepType1Type): + """ + + expr: str + type: ListQueueResponse200ItemRawFlowModulesItemSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = ListQueueResponse200ItemRawFlowModulesItemSleepType1Type(d.pop("type")) + + list_queue_response_200_item_raw_flow_modules_item_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + list_queue_response_200_item_raw_flow_modules_item_sleep_type_1.additional_properties = d + return list_queue_response_200_item_raw_flow_modules_item_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_sleep_type_1_type.py new file mode 100644 index 0000000000..67e009fbb5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListQueueResponse200ItemRawFlowModulesItemSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_stop_after_if.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_stop_after_if.py new file mode 100644 index 0000000000..a8e8a9baf9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowModulesItemStopAfterIf") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowModulesItemStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + list_queue_response_200_item_raw_flow_modules_item_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + list_queue_response_200_item_raw_flow_modules_item_stop_after_if.additional_properties = d + return list_queue_response_200_item_raw_flow_modules_item_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_0.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_0.py new file mode 100644 index 0000000000..ba22edeb20 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_queue_response_200_item_raw_flow_modules_item_value_type_0_language import ( + ListQueueResponse200ItemRawFlowModulesItemValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowModulesItemValueType0") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowModulesItemValueType0: + """ + Attributes: + content (str): + language (ListQueueResponse200ItemRawFlowModulesItemValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: ListQueueResponse200ItemRawFlowModulesItemValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = ListQueueResponse200ItemRawFlowModulesItemValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + list_queue_response_200_item_raw_flow_modules_item_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + list_queue_response_200_item_raw_flow_modules_item_value_type_0.additional_properties = d + return list_queue_response_200_item_raw_flow_modules_item_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_0_language.py new file mode 100644 index 0000000000..7d854f0be7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ListQueueResponse200ItemRawFlowModulesItemValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_1.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_1.py new file mode 100644 index 0000000000..120be16d14 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_queue_response_200_item_raw_flow_modules_item_value_type_1_type import ( + ListQueueResponse200ItemRawFlowModulesItemValueType1Type, +) + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowModulesItemValueType1") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowModulesItemValueType1: + """ + Attributes: + path (str): + type (ListQueueResponse200ItemRawFlowModulesItemValueType1Type): + """ + + path: str + type: ListQueueResponse200ItemRawFlowModulesItemValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = ListQueueResponse200ItemRawFlowModulesItemValueType1Type(d.pop("type")) + + list_queue_response_200_item_raw_flow_modules_item_value_type_1 = cls( + path=path, + type=type, + ) + + list_queue_response_200_item_raw_flow_modules_item_value_type_1.additional_properties = d + return list_queue_response_200_item_raw_flow_modules_item_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_1_type.py new file mode 100644 index 0000000000..bf825b3a02 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListQueueResponse200ItemRawFlowModulesItemValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2.py new file mode 100644 index 0000000000..aa09018ba2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2.py @@ -0,0 +1,112 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0 import ( + ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType0, +) +from ..models.list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1 import ( + ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType1, +) +from ..models.list_queue_response_200_item_raw_flow_modules_item_value_type_2_type import ( + ListQueueResponse200ItemRawFlowModulesItemValueType2Type, +) + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowModulesItemValueType2") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowModulesItemValueType2: + """ + Attributes: + iterator (Union[ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType0, + ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType1]): + skip_failures (bool): + type (ListQueueResponse200ItemRawFlowModulesItemValueType2Type): + """ + + iterator: Union[ + ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType0, + ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType1, + ] + skip_failures: bool + type: ListQueueResponse200ItemRawFlowModulesItemValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType0, + ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = ListQueueResponse200ItemRawFlowModulesItemValueType2Type(d.pop("type")) + + list_queue_response_200_item_raw_flow_modules_item_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + list_queue_response_200_item_raw_flow_modules_item_value_type_2.additional_properties = d + return list_queue_response_200_item_raw_flow_modules_item_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..dd2be0f036 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0_type import ( + ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType0: + """ + Attributes: + type (ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0.additional_properties = d + return list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..d5dfcbd0bb --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..a52ca3ef7c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1_type import ( + ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType1: + """ + Attributes: + expr (str): + type (ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType1Type): + """ + + expr: str + type: ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType1Type(d.pop("type")) + + list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1.additional_properties = d + return list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..4f730f609f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListQueueResponse200ItemRawFlowModulesItemValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2_type.py new file mode 100644 index 0000000000..32e2bdbdd3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListQueueResponse200ItemRawFlowModulesItemValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_3.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_3.py new file mode 100644 index 0000000000..2dd8bf829b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_3.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_queue_response_200_item_raw_flow_modules_item_value_type_3_type import ( + ListQueueResponse200ItemRawFlowModulesItemValueType3Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListQueueResponse200ItemRawFlowModulesItemValueType3") + + +@attr.s(auto_attribs=True) +class ListQueueResponse200ItemRawFlowModulesItemValueType3: + """ + Attributes: + type (ListQueueResponse200ItemRawFlowModulesItemValueType3Type): + path (Union[Unset, str]): + """ + + type: ListQueueResponse200ItemRawFlowModulesItemValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = ListQueueResponse200ItemRawFlowModulesItemValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + list_queue_response_200_item_raw_flow_modules_item_value_type_3 = cls( + type=type, + path=path, + ) + + list_queue_response_200_item_raw_flow_modules_item_value_type_3.additional_properties = d + return list_queue_response_200_item_raw_flow_modules_item_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_3_type.py new file mode 100644 index 0000000000..53feba740a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_queue_response_200_item_raw_flow_modules_item_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ListQueueResponse200ItemRawFlowModulesItemValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_resource_response_200_item.py b/python-client/windmill-api/windmill_api/models/list_resource_response_200_item.py new file mode 100644 index 0000000000..dba8d98c4c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_resource_response_200_item.py @@ -0,0 +1,122 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_resource_response_200_item_extra_perms import ListResourceResponse200ItemExtraPerms +from ..models.list_resource_response_200_item_value import ListResourceResponse200ItemValue +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListResourceResponse200Item") + + +@attr.s(auto_attribs=True) +class ListResourceResponse200Item: + """ + Attributes: + path (str): + resource_type (str): + is_oauth (bool): + workspace_id (Union[Unset, str]): + description (Union[Unset, str]): + value (Union[Unset, ListResourceResponse200ItemValue]): + extra_perms (Union[Unset, ListResourceResponse200ItemExtraPerms]): + """ + + path: str + resource_type: str + is_oauth: bool + workspace_id: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + value: Union[Unset, ListResourceResponse200ItemValue] = UNSET + extra_perms: Union[Unset, ListResourceResponse200ItemExtraPerms] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + resource_type = self.resource_type + is_oauth = self.is_oauth + workspace_id = self.workspace_id + description = self.description + value: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.value, Unset): + value = self.value.to_dict() + + extra_perms: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.extra_perms, Unset): + extra_perms = self.extra_perms.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "resource_type": resource_type, + "is_oauth": is_oauth, + } + ) + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if description is not UNSET: + field_dict["description"] = description + if value is not UNSET: + field_dict["value"] = value + if extra_perms is not UNSET: + field_dict["extra_perms"] = extra_perms + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + resource_type = d.pop("resource_type") + + is_oauth = d.pop("is_oauth") + + workspace_id = d.pop("workspace_id", UNSET) + + description = d.pop("description", UNSET) + + _value = d.pop("value", UNSET) + value: Union[Unset, ListResourceResponse200ItemValue] + if isinstance(_value, Unset): + value = UNSET + else: + value = ListResourceResponse200ItemValue.from_dict(_value) + + _extra_perms = d.pop("extra_perms", UNSET) + extra_perms: Union[Unset, ListResourceResponse200ItemExtraPerms] + if isinstance(_extra_perms, Unset): + extra_perms = UNSET + else: + extra_perms = ListResourceResponse200ItemExtraPerms.from_dict(_extra_perms) + + list_resource_response_200_item = cls( + path=path, + resource_type=resource_type, + is_oauth=is_oauth, + workspace_id=workspace_id, + description=description, + value=value, + extra_perms=extra_perms, + ) + + list_resource_response_200_item.additional_properties = d + return list_resource_response_200_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_resource_response_200_item_extra_perms.py b/python-client/windmill-api/windmill_api/models/list_resource_response_200_item_extra_perms.py new file mode 100644 index 0000000000..094abfd6ef --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_resource_response_200_item_extra_perms.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ListResourceResponse200ItemExtraPerms") + + +@attr.s(auto_attribs=True) +class ListResourceResponse200ItemExtraPerms: + """ """ + + additional_properties: Dict[str, bool] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + list_resource_response_200_item_extra_perms = cls() + + list_resource_response_200_item_extra_perms.additional_properties = d + return list_resource_response_200_item_extra_perms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> bool: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: bool) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_resource_response_200_item_value.py b/python-client/windmill-api/windmill_api/models/list_resource_response_200_item_value.py new file mode 100644 index 0000000000..08dd42ea02 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_resource_response_200_item_value.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ListResourceResponse200ItemValue") + + +@attr.s(auto_attribs=True) +class ListResourceResponse200ItemValue: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + list_resource_response_200_item_value = cls() + + list_resource_response_200_item_value.additional_properties = d + return list_resource_response_200_item_value + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_resource_type_response_200_item.py b/python-client/windmill-api/windmill_api/models/list_resource_type_response_200_item.py new file mode 100644 index 0000000000..224cf6c01d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_resource_type_response_200_item.py @@ -0,0 +1,83 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListResourceTypeResponse200Item") + + +@attr.s(auto_attribs=True) +class ListResourceTypeResponse200Item: + """ + Attributes: + name (str): + workspace_id (Union[Unset, str]): + schema (Union[Unset, Any]): + description (Union[Unset, str]): + """ + + name: str + workspace_id: Union[Unset, str] = UNSET + schema: Union[Unset, Any] = UNSET + description: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + workspace_id = self.workspace_id + schema = self.schema + description = self.description + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if schema is not UNSET: + field_dict["schema"] = schema + if description is not UNSET: + field_dict["description"] = description + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name") + + workspace_id = d.pop("workspace_id", UNSET) + + schema = d.pop("schema", UNSET) + + description = d.pop("description", UNSET) + + list_resource_type_response_200_item = cls( + name=name, + workspace_id=workspace_id, + schema=schema, + description=description, + ) + + list_resource_type_response_200_item.additional_properties = d + return list_resource_type_response_200_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_schedules_response_200_item.py b/python-client/windmill-api/windmill_api/models/list_schedules_response_200_item.py new file mode 100644 index 0000000000..e98d1f7928 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_schedules_response_200_item.py @@ -0,0 +1,136 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.list_schedules_response_200_item_args import ListSchedulesResponse200ItemArgs +from ..models.list_schedules_response_200_item_extra_perms import ListSchedulesResponse200ItemExtraPerms +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListSchedulesResponse200Item") + + +@attr.s(auto_attribs=True) +class ListSchedulesResponse200Item: + """ + Attributes: + path (str): + edited_by (str): + edited_at (datetime.datetime): + schedule (str): + offset (int): + enabled (bool): + script_path (str): + is_flow (bool): + extra_perms (ListSchedulesResponse200ItemExtraPerms): + args (Union[Unset, ListSchedulesResponse200ItemArgs]): + """ + + path: str + edited_by: str + edited_at: datetime.datetime + schedule: str + offset: int + enabled: bool + script_path: str + is_flow: bool + extra_perms: ListSchedulesResponse200ItemExtraPerms + args: Union[Unset, ListSchedulesResponse200ItemArgs] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + edited_by = self.edited_by + edited_at = self.edited_at.isoformat() + + schedule = self.schedule + offset = self.offset + enabled = self.enabled + script_path = self.script_path + is_flow = self.is_flow + extra_perms = self.extra_perms.to_dict() + + args: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.args, Unset): + args = self.args.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "edited_by": edited_by, + "edited_at": edited_at, + "schedule": schedule, + "offset_": offset, + "enabled": enabled, + "script_path": script_path, + "is_flow": is_flow, + "extra_perms": extra_perms, + } + ) + if args is not UNSET: + field_dict["args"] = args + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + edited_by = d.pop("edited_by") + + edited_at = isoparse(d.pop("edited_at")) + + schedule = d.pop("schedule") + + offset = d.pop("offset_") + + enabled = d.pop("enabled") + + script_path = d.pop("script_path") + + is_flow = d.pop("is_flow") + + extra_perms = ListSchedulesResponse200ItemExtraPerms.from_dict(d.pop("extra_perms")) + + _args = d.pop("args", UNSET) + args: Union[Unset, ListSchedulesResponse200ItemArgs] + if isinstance(_args, Unset): + args = UNSET + else: + args = ListSchedulesResponse200ItemArgs.from_dict(_args) + + list_schedules_response_200_item = cls( + path=path, + edited_by=edited_by, + edited_at=edited_at, + schedule=schedule, + offset=offset, + enabled=enabled, + script_path=script_path, + is_flow=is_flow, + extra_perms=extra_perms, + args=args, + ) + + list_schedules_response_200_item.additional_properties = d + return list_schedules_response_200_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_schedules_response_200_item_args.py b/python-client/windmill-api/windmill_api/models/list_schedules_response_200_item_args.py new file mode 100644 index 0000000000..e8dcfd1f49 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_schedules_response_200_item_args.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ListSchedulesResponse200ItemArgs") + + +@attr.s(auto_attribs=True) +class ListSchedulesResponse200ItemArgs: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + list_schedules_response_200_item_args = cls() + + list_schedules_response_200_item_args.additional_properties = d + return list_schedules_response_200_item_args + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_schedules_response_200_item_extra_perms.py b/python-client/windmill-api/windmill_api/models/list_schedules_response_200_item_extra_perms.py new file mode 100644 index 0000000000..162f0a32b1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_schedules_response_200_item_extra_perms.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ListSchedulesResponse200ItemExtraPerms") + + +@attr.s(auto_attribs=True) +class ListSchedulesResponse200ItemExtraPerms: + """ """ + + additional_properties: Dict[str, bool] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + list_schedules_response_200_item_extra_perms = cls() + + list_schedules_response_200_item_extra_perms.additional_properties = d + return list_schedules_response_200_item_extra_perms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> bool: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: bool) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_scripts_response_200_item.py b/python-client/windmill-api/windmill_api/models/list_scripts_response_200_item.py new file mode 100644 index 0000000000..38de809aab --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_scripts_response_200_item.py @@ -0,0 +1,206 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr +from dateutil.parser import isoparse + +from ..models.list_scripts_response_200_item_extra_perms import ListScriptsResponse200ItemExtraPerms +from ..models.list_scripts_response_200_item_kind import ListScriptsResponse200ItemKind +from ..models.list_scripts_response_200_item_language import ListScriptsResponse200ItemLanguage +from ..models.list_scripts_response_200_item_schema import ListScriptsResponse200ItemSchema +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListScriptsResponse200Item") + + +@attr.s(auto_attribs=True) +class ListScriptsResponse200Item: + """ + Attributes: + hash_ (str): + path (str): + summary (str): + content (str): + created_by (str): + created_at (datetime.datetime): + archived (bool): + deleted (bool): + is_template (bool): + extra_perms (ListScriptsResponse200ItemExtraPerms): + language (ListScriptsResponse200ItemLanguage): + kind (ListScriptsResponse200ItemKind): + workspace_id (Union[Unset, str]): + parent_hashes (Union[Unset, List[str]]): The first element is the direct parent of the script, the second is the + parent of the first, etc + description (Union[Unset, str]): + schema (Union[Unset, ListScriptsResponse200ItemSchema]): + lock (Union[Unset, str]): + lock_error_logs (Union[Unset, str]): + """ + + hash_: str + path: str + summary: str + content: str + created_by: str + created_at: datetime.datetime + archived: bool + deleted: bool + is_template: bool + extra_perms: ListScriptsResponse200ItemExtraPerms + language: ListScriptsResponse200ItemLanguage + kind: ListScriptsResponse200ItemKind + workspace_id: Union[Unset, str] = UNSET + parent_hashes: Union[Unset, List[str]] = UNSET + description: Union[Unset, str] = UNSET + schema: Union[Unset, ListScriptsResponse200ItemSchema] = UNSET + lock: Union[Unset, str] = UNSET + lock_error_logs: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + hash_ = self.hash_ + path = self.path + summary = self.summary + content = self.content + created_by = self.created_by + created_at = self.created_at.isoformat() + + archived = self.archived + deleted = self.deleted + is_template = self.is_template + extra_perms = self.extra_perms.to_dict() + + language = self.language.value + + kind = self.kind.value + + workspace_id = self.workspace_id + parent_hashes: Union[Unset, List[str]] = UNSET + if not isinstance(self.parent_hashes, Unset): + parent_hashes = self.parent_hashes + + description = self.description + schema: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.schema, Unset): + schema = self.schema.to_dict() + + lock = self.lock + lock_error_logs = self.lock_error_logs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "hash": hash_, + "path": path, + "summary": summary, + "content": content, + "created_by": created_by, + "created_at": created_at, + "archived": archived, + "deleted": deleted, + "is_template": is_template, + "extra_perms": extra_perms, + "language": language, + "kind": kind, + } + ) + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if parent_hashes is not UNSET: + field_dict["parent_hashes"] = parent_hashes + if description is not UNSET: + field_dict["description"] = description + if schema is not UNSET: + field_dict["schema"] = schema + if lock is not UNSET: + field_dict["lock"] = lock + if lock_error_logs is not UNSET: + field_dict["lock_error_logs"] = lock_error_logs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + hash_ = d.pop("hash") + + path = d.pop("path") + + summary = d.pop("summary") + + content = d.pop("content") + + created_by = d.pop("created_by") + + created_at = isoparse(d.pop("created_at")) + + archived = d.pop("archived") + + deleted = d.pop("deleted") + + is_template = d.pop("is_template") + + extra_perms = ListScriptsResponse200ItemExtraPerms.from_dict(d.pop("extra_perms")) + + language = ListScriptsResponse200ItemLanguage(d.pop("language")) + + kind = ListScriptsResponse200ItemKind(d.pop("kind")) + + workspace_id = d.pop("workspace_id", UNSET) + + parent_hashes = cast(List[str], d.pop("parent_hashes", UNSET)) + + description = d.pop("description", UNSET) + + _schema = d.pop("schema", UNSET) + schema: Union[Unset, ListScriptsResponse200ItemSchema] + if isinstance(_schema, Unset): + schema = UNSET + else: + schema = ListScriptsResponse200ItemSchema.from_dict(_schema) + + lock = d.pop("lock", UNSET) + + lock_error_logs = d.pop("lock_error_logs", UNSET) + + list_scripts_response_200_item = cls( + hash_=hash_, + path=path, + summary=summary, + content=content, + created_by=created_by, + created_at=created_at, + archived=archived, + deleted=deleted, + is_template=is_template, + extra_perms=extra_perms, + language=language, + kind=kind, + workspace_id=workspace_id, + parent_hashes=parent_hashes, + description=description, + schema=schema, + lock=lock, + lock_error_logs=lock_error_logs, + ) + + list_scripts_response_200_item.additional_properties = d + return list_scripts_response_200_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_scripts_response_200_item_extra_perms.py b/python-client/windmill-api/windmill_api/models/list_scripts_response_200_item_extra_perms.py new file mode 100644 index 0000000000..09494a91c6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_scripts_response_200_item_extra_perms.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ListScriptsResponse200ItemExtraPerms") + + +@attr.s(auto_attribs=True) +class ListScriptsResponse200ItemExtraPerms: + """ """ + + additional_properties: Dict[str, bool] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + list_scripts_response_200_item_extra_perms = cls() + + list_scripts_response_200_item_extra_perms.additional_properties = d + return list_scripts_response_200_item_extra_perms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> bool: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: bool) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_scripts_response_200_item_kind.py b/python-client/windmill-api/windmill_api/models/list_scripts_response_200_item_kind.py new file mode 100644 index 0000000000..21126ef76e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_scripts_response_200_item_kind.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class ListScriptsResponse200ItemKind(str, Enum): + SCRIPT = "script" + FAILURE = "failure" + TRIGGER = "trigger" + COMMAND = "command" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_scripts_response_200_item_language.py b/python-client/windmill-api/windmill_api/models/list_scripts_response_200_item_language.py new file mode 100644 index 0000000000..c0e2335594 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_scripts_response_200_item_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ListScriptsResponse200ItemLanguage(str, Enum): + PYTHON3 = "python3" + DENO = "deno" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_scripts_response_200_item_schema.py b/python-client/windmill-api/windmill_api/models/list_scripts_response_200_item_schema.py new file mode 100644 index 0000000000..7f507626d8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_scripts_response_200_item_schema.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ListScriptsResponse200ItemSchema") + + +@attr.s(auto_attribs=True) +class ListScriptsResponse200ItemSchema: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + list_scripts_response_200_item_schema = cls() + + list_scripts_response_200_item_schema.additional_properties = d + return list_scripts_response_200_item_schema + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_tokens_response_200_item.py b/python-client/windmill-api/windmill_api/models/list_tokens_response_200_item.py new file mode 100644 index 0000000000..af5edd491e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_tokens_response_200_item.py @@ -0,0 +1,100 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListTokensResponse200Item") + + +@attr.s(auto_attribs=True) +class ListTokensResponse200Item: + """ + Attributes: + token_prefix (str): + created_at (datetime.datetime): + last_used_at (datetime.datetime): + label (Union[Unset, str]): + expiration (Union[Unset, datetime.datetime]): + """ + + token_prefix: str + created_at: datetime.datetime + last_used_at: datetime.datetime + label: Union[Unset, str] = UNSET + expiration: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + token_prefix = self.token_prefix + created_at = self.created_at.isoformat() + + last_used_at = self.last_used_at.isoformat() + + label = self.label + expiration: Union[Unset, str] = UNSET + if not isinstance(self.expiration, Unset): + expiration = self.expiration.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "token_prefix": token_prefix, + "created_at": created_at, + "last_used_at": last_used_at, + } + ) + if label is not UNSET: + field_dict["label"] = label + if expiration is not UNSET: + field_dict["expiration"] = expiration + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + token_prefix = d.pop("token_prefix") + + created_at = isoparse(d.pop("created_at")) + + last_used_at = isoparse(d.pop("last_used_at")) + + label = d.pop("label", UNSET) + + _expiration = d.pop("expiration", UNSET) + expiration: Union[Unset, datetime.datetime] + if isinstance(_expiration, Unset): + expiration = UNSET + else: + expiration = isoparse(_expiration) + + list_tokens_response_200_item = cls( + token_prefix=token_prefix, + created_at=created_at, + last_used_at=last_used_at, + label=label, + expiration=expiration, + ) + + list_tokens_response_200_item.additional_properties = d + return list_tokens_response_200_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_user_workspaces_response_200.py b/python-client/windmill-api/windmill_api/models/list_user_workspaces_response_200.py new file mode 100644 index 0000000000..7289fee171 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_user_workspaces_response_200.py @@ -0,0 +1,75 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.list_user_workspaces_response_200_workspaces_item import ListUserWorkspacesResponse200WorkspacesItem + +T = TypeVar("T", bound="ListUserWorkspacesResponse200") + + +@attr.s(auto_attribs=True) +class ListUserWorkspacesResponse200: + """ + Attributes: + email (str): + workspaces (List[ListUserWorkspacesResponse200WorkspacesItem]): + """ + + email: str + workspaces: List[ListUserWorkspacesResponse200WorkspacesItem] + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + email = self.email + workspaces = [] + for workspaces_item_data in self.workspaces: + workspaces_item = workspaces_item_data.to_dict() + + workspaces.append(workspaces_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "email": email, + "workspaces": workspaces, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + email = d.pop("email") + + workspaces = [] + _workspaces = d.pop("workspaces") + for workspaces_item_data in _workspaces: + workspaces_item = ListUserWorkspacesResponse200WorkspacesItem.from_dict(workspaces_item_data) + + workspaces.append(workspaces_item) + + list_user_workspaces_response_200 = cls( + email=email, + workspaces=workspaces, + ) + + list_user_workspaces_response_200.additional_properties = d + return list_user_workspaces_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_user_workspaces_response_200_workspaces_item.py b/python-client/windmill-api/windmill_api/models/list_user_workspaces_response_200_workspaces_item.py new file mode 100644 index 0000000000..50008ec712 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_user_workspaces_response_200_workspaces_item.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ListUserWorkspacesResponse200WorkspacesItem") + + +@attr.s(auto_attribs=True) +class ListUserWorkspacesResponse200WorkspacesItem: + """ + Attributes: + id (str): + name (str): + username (str): + """ + + id: str + name: str + username: str + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + name = self.name + username = self.username + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "username": username, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id") + + name = d.pop("name") + + username = d.pop("username") + + list_user_workspaces_response_200_workspaces_item = cls( + id=id, + name=name, + username=username, + ) + + list_user_workspaces_response_200_workspaces_item.additional_properties = d + return list_user_workspaces_response_200_workspaces_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_users_as_super_admin_response_200_item.py b/python-client/windmill-api/windmill_api/models/list_users_as_super_admin_response_200_item.py new file mode 100644 index 0000000000..4ba15cf2fd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_users_as_super_admin_response_200_item.py @@ -0,0 +1,100 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_users_as_super_admin_response_200_item_login_type import ( + ListUsersAsSuperAdminResponse200ItemLoginType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListUsersAsSuperAdminResponse200Item") + + +@attr.s(auto_attribs=True) +class ListUsersAsSuperAdminResponse200Item: + """ + Attributes: + email (str): + login_type (ListUsersAsSuperAdminResponse200ItemLoginType): + super_admin (bool): + verified (bool): + name (Union[Unset, str]): + company (Union[Unset, str]): + """ + + email: str + login_type: ListUsersAsSuperAdminResponse200ItemLoginType + super_admin: bool + verified: bool + name: Union[Unset, str] = UNSET + company: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + email = self.email + login_type = self.login_type.value + + super_admin = self.super_admin + verified = self.verified + name = self.name + company = self.company + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "email": email, + "login_type": login_type, + "super_admin": super_admin, + "verified": verified, + } + ) + if name is not UNSET: + field_dict["name"] = name + if company is not UNSET: + field_dict["company"] = company + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + email = d.pop("email") + + login_type = ListUsersAsSuperAdminResponse200ItemLoginType(d.pop("login_type")) + + super_admin = d.pop("super_admin") + + verified = d.pop("verified") + + name = d.pop("name", UNSET) + + company = d.pop("company", UNSET) + + list_users_as_super_admin_response_200_item = cls( + email=email, + login_type=login_type, + super_admin=super_admin, + verified=verified, + name=name, + company=company, + ) + + list_users_as_super_admin_response_200_item.additional_properties = d + return list_users_as_super_admin_response_200_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_users_as_super_admin_response_200_item_login_type.py b/python-client/windmill-api/windmill_api/models/list_users_as_super_admin_response_200_item_login_type.py new file mode 100644 index 0000000000..05ecce5118 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_users_as_super_admin_response_200_item_login_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ListUsersAsSuperAdminResponse200ItemLoginType(str, Enum): + PASSWORD = "password" + GITHUB = "github" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/list_users_response_200_item.py b/python-client/windmill-api/windmill_api/models/list_users_response_200_item.py new file mode 100644 index 0000000000..b7fb0424b9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_users_response_200_item.py @@ -0,0 +1,131 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr +from dateutil.parser import isoparse + +from ..models.list_users_response_200_item_usage import ListUsersResponse200ItemUsage +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListUsersResponse200Item") + + +@attr.s(auto_attribs=True) +class ListUsersResponse200Item: + """ + Attributes: + email (str): + username (str): + is_admin (bool): + is_super_admin (bool): + created_at (datetime.datetime): + operator (bool): + disabled (bool): + groups (Union[Unset, List[str]]): + usage (Union[Unset, ListUsersResponse200ItemUsage]): + """ + + email: str + username: str + is_admin: bool + is_super_admin: bool + created_at: datetime.datetime + operator: bool + disabled: bool + groups: Union[Unset, List[str]] = UNSET + usage: Union[Unset, ListUsersResponse200ItemUsage] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + email = self.email + username = self.username + is_admin = self.is_admin + is_super_admin = self.is_super_admin + created_at = self.created_at.isoformat() + + operator = self.operator + disabled = self.disabled + groups: Union[Unset, List[str]] = UNSET + if not isinstance(self.groups, Unset): + groups = self.groups + + usage: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.usage, Unset): + usage = self.usage.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "email": email, + "username": username, + "is_admin": is_admin, + "is_super_admin": is_super_admin, + "created_at": created_at, + "operator": operator, + "disabled": disabled, + } + ) + if groups is not UNSET: + field_dict["groups"] = groups + if usage is not UNSET: + field_dict["usage"] = usage + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + email = d.pop("email") + + username = d.pop("username") + + is_admin = d.pop("is_admin") + + is_super_admin = d.pop("is_super_admin") + + created_at = isoparse(d.pop("created_at")) + + operator = d.pop("operator") + + disabled = d.pop("disabled") + + groups = cast(List[str], d.pop("groups", UNSET)) + + _usage = d.pop("usage", UNSET) + usage: Union[Unset, ListUsersResponse200ItemUsage] + if isinstance(_usage, Unset): + usage = UNSET + else: + usage = ListUsersResponse200ItemUsage.from_dict(_usage) + + list_users_response_200_item = cls( + email=email, + username=username, + is_admin=is_admin, + is_super_admin=is_super_admin, + created_at=created_at, + operator=operator, + disabled=disabled, + groups=groups, + usage=usage, + ) + + list_users_response_200_item.additional_properties = d + return list_users_response_200_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_users_response_200_item_usage.py b/python-client/windmill-api/windmill_api/models/list_users_response_200_item_usage.py new file mode 100644 index 0000000000..d64415fad5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_users_response_200_item_usage.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListUsersResponse200ItemUsage") + + +@attr.s(auto_attribs=True) +class ListUsersResponse200ItemUsage: + """ + Attributes: + duration_ms (Union[Unset, int]): + jobs (Union[Unset, int]): + flows (Union[Unset, int]): + """ + + duration_ms: Union[Unset, int] = UNSET + jobs: Union[Unset, int] = UNSET + flows: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + duration_ms = self.duration_ms + jobs = self.jobs + flows = self.flows + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if duration_ms is not UNSET: + field_dict["duration_ms"] = duration_ms + if jobs is not UNSET: + field_dict["jobs"] = jobs + if flows is not UNSET: + field_dict["flows"] = flows + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + duration_ms = d.pop("duration_ms", UNSET) + + jobs = d.pop("jobs", UNSET) + + flows = d.pop("flows", UNSET) + + list_users_response_200_item_usage = cls( + duration_ms=duration_ms, + jobs=jobs, + flows=flows, + ) + + list_users_response_200_item_usage.additional_properties = d + return list_users_response_200_item_usage + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_variable_response_200_item.py b/python-client/windmill-api/windmill_api/models/list_variable_response_200_item.py new file mode 100644 index 0000000000..ca6891aa9a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_variable_response_200_item.py @@ -0,0 +1,114 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.list_variable_response_200_item_extra_perms import ListVariableResponse200ItemExtraPerms +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListVariableResponse200Item") + + +@attr.s(auto_attribs=True) +class ListVariableResponse200Item: + """ + Attributes: + workspace_id (str): + path (str): + is_secret (bool): + extra_perms (ListVariableResponse200ItemExtraPerms): + value (Union[Unset, str]): + description (Union[Unset, str]): + account (Union[Unset, str]): + is_oauth (Union[Unset, bool]): + """ + + workspace_id: str + path: str + is_secret: bool + extra_perms: ListVariableResponse200ItemExtraPerms + value: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + account: Union[Unset, str] = UNSET + is_oauth: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + workspace_id = self.workspace_id + path = self.path + is_secret = self.is_secret + extra_perms = self.extra_perms.to_dict() + + value = self.value + description = self.description + account = self.account + is_oauth = self.is_oauth + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "workspace_id": workspace_id, + "path": path, + "is_secret": is_secret, + "extra_perms": extra_perms, + } + ) + if value is not UNSET: + field_dict["value"] = value + if description is not UNSET: + field_dict["description"] = description + if account is not UNSET: + field_dict["account"] = account + if is_oauth is not UNSET: + field_dict["is_oauth"] = is_oauth + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + workspace_id = d.pop("workspace_id") + + path = d.pop("path") + + is_secret = d.pop("is_secret") + + extra_perms = ListVariableResponse200ItemExtraPerms.from_dict(d.pop("extra_perms")) + + value = d.pop("value", UNSET) + + description = d.pop("description", UNSET) + + account = d.pop("account", UNSET) + + is_oauth = d.pop("is_oauth", UNSET) + + list_variable_response_200_item = cls( + workspace_id=workspace_id, + path=path, + is_secret=is_secret, + extra_perms=extra_perms, + value=value, + description=description, + account=account, + is_oauth=is_oauth, + ) + + list_variable_response_200_item.additional_properties = d + return list_variable_response_200_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_variable_response_200_item_extra_perms.py b/python-client/windmill-api/windmill_api/models/list_variable_response_200_item_extra_perms.py new file mode 100644 index 0000000000..41fed71621 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_variable_response_200_item_extra_perms.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ListVariableResponse200ItemExtraPerms") + + +@attr.s(auto_attribs=True) +class ListVariableResponse200ItemExtraPerms: + """ """ + + additional_properties: Dict[str, bool] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + list_variable_response_200_item_extra_perms = cls() + + list_variable_response_200_item_extra_perms.additional_properties = d + return list_variable_response_200_item_extra_perms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> bool: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: bool) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_workers_response_200_item.py b/python-client/windmill-api/windmill_api/models/list_workers_response_200_item.py new file mode 100644 index 0000000000..54d00f9365 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_workers_response_200_item.py @@ -0,0 +1,96 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar + +import attr +from dateutil.parser import isoparse + +T = TypeVar("T", bound="ListWorkersResponse200Item") + + +@attr.s(auto_attribs=True) +class ListWorkersResponse200Item: + """ + Attributes: + worker (str): + worker_instance (str): + ping_at (datetime.datetime): + started_at (datetime.datetime): + ip (str): + jobs_executed (float): + """ + + worker: str + worker_instance: str + ping_at: datetime.datetime + started_at: datetime.datetime + ip: str + jobs_executed: float + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + worker = self.worker + worker_instance = self.worker_instance + ping_at = self.ping_at.isoformat() + + started_at = self.started_at.isoformat() + + ip = self.ip + jobs_executed = self.jobs_executed + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "worker": worker, + "worker_instance": worker_instance, + "ping_at": ping_at, + "started_at": started_at, + "ip": ip, + "jobs_executed": jobs_executed, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + worker = d.pop("worker") + + worker_instance = d.pop("worker_instance") + + ping_at = isoparse(d.pop("ping_at")) + + started_at = isoparse(d.pop("started_at")) + + ip = d.pop("ip") + + jobs_executed = d.pop("jobs_executed") + + list_workers_response_200_item = cls( + worker=worker, + worker_instance=worker_instance, + ping_at=ping_at, + started_at=started_at, + ip=ip, + jobs_executed=jobs_executed, + ) + + list_workers_response_200_item.additional_properties = d + return list_workers_response_200_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_workspace_invites_response_200_item.py b/python-client/windmill-api/windmill_api/models/list_workspace_invites_response_200_item.py new file mode 100644 index 0000000000..8015ae9847 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_workspace_invites_response_200_item.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ListWorkspaceInvitesResponse200Item") + + +@attr.s(auto_attribs=True) +class ListWorkspaceInvitesResponse200Item: + """ + Attributes: + workspace_id (str): + email (str): + is_admin (bool): + """ + + workspace_id: str + email: str + is_admin: bool + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + workspace_id = self.workspace_id + email = self.email + is_admin = self.is_admin + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "workspace_id": workspace_id, + "email": email, + "is_admin": is_admin, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + workspace_id = d.pop("workspace_id") + + email = d.pop("email") + + is_admin = d.pop("is_admin") + + list_workspace_invites_response_200_item = cls( + workspace_id=workspace_id, + email=email, + is_admin=is_admin, + ) + + list_workspace_invites_response_200_item.additional_properties = d + return list_workspace_invites_response_200_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_workspaces_as_super_admin_response_200_item.py b/python-client/windmill-api/windmill_api/models/list_workspaces_as_super_admin_response_200_item.py new file mode 100644 index 0000000000..e0eb04274f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_workspaces_as_super_admin_response_200_item.py @@ -0,0 +1,81 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListWorkspacesAsSuperAdminResponse200Item") + + +@attr.s(auto_attribs=True) +class ListWorkspacesAsSuperAdminResponse200Item: + """ + Attributes: + id (str): + name (str): + owner (str): + domain (Union[Unset, str]): + """ + + id: str + name: str + owner: str + domain: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + name = self.name + owner = self.owner + domain = self.domain + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "owner": owner, + } + ) + if domain is not UNSET: + field_dict["domain"] = domain + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id") + + name = d.pop("name") + + owner = d.pop("owner") + + domain = d.pop("domain", UNSET) + + list_workspaces_as_super_admin_response_200_item = cls( + id=id, + name=name, + owner=owner, + domain=domain, + ) + + list_workspaces_as_super_admin_response_200_item.additional_properties = d + return list_workspaces_as_super_admin_response_200_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/list_workspaces_response_200_item.py b/python-client/windmill-api/windmill_api/models/list_workspaces_response_200_item.py new file mode 100644 index 0000000000..eb15dafb34 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/list_workspaces_response_200_item.py @@ -0,0 +1,81 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListWorkspacesResponse200Item") + + +@attr.s(auto_attribs=True) +class ListWorkspacesResponse200Item: + """ + Attributes: + id (str): + name (str): + owner (str): + domain (Union[Unset, str]): + """ + + id: str + name: str + owner: str + domain: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + name = self.name + owner = self.owner + domain = self.domain + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "owner": owner, + } + ) + if domain is not UNSET: + field_dict["domain"] = domain + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id") + + name = d.pop("name") + + owner = d.pop("owner") + + domain = d.pop("domain", UNSET) + + list_workspaces_response_200_item = cls( + id=id, + name=name, + owner=owner, + domain=domain, + ) + + list_workspaces_response_200_item.additional_properties = d + return list_workspaces_response_200_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/listable_variable.py b/python-client/windmill-api/windmill_api/models/listable_variable.py new file mode 100644 index 0000000000..ab9c5853a5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/listable_variable.py @@ -0,0 +1,114 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.listable_variable_extra_perms import ListableVariableExtraPerms +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ListableVariable") + + +@attr.s(auto_attribs=True) +class ListableVariable: + """ + Attributes: + workspace_id (str): + path (str): + is_secret (bool): + extra_perms (ListableVariableExtraPerms): + value (Union[Unset, str]): + description (Union[Unset, str]): + account (Union[Unset, str]): + is_oauth (Union[Unset, bool]): + """ + + workspace_id: str + path: str + is_secret: bool + extra_perms: ListableVariableExtraPerms + value: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + account: Union[Unset, str] = UNSET + is_oauth: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + workspace_id = self.workspace_id + path = self.path + is_secret = self.is_secret + extra_perms = self.extra_perms.to_dict() + + value = self.value + description = self.description + account = self.account + is_oauth = self.is_oauth + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "workspace_id": workspace_id, + "path": path, + "is_secret": is_secret, + "extra_perms": extra_perms, + } + ) + if value is not UNSET: + field_dict["value"] = value + if description is not UNSET: + field_dict["description"] = description + if account is not UNSET: + field_dict["account"] = account + if is_oauth is not UNSET: + field_dict["is_oauth"] = is_oauth + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + workspace_id = d.pop("workspace_id") + + path = d.pop("path") + + is_secret = d.pop("is_secret") + + extra_perms = ListableVariableExtraPerms.from_dict(d.pop("extra_perms")) + + value = d.pop("value", UNSET) + + description = d.pop("description", UNSET) + + account = d.pop("account", UNSET) + + is_oauth = d.pop("is_oauth", UNSET) + + listable_variable = cls( + workspace_id=workspace_id, + path=path, + is_secret=is_secret, + extra_perms=extra_perms, + value=value, + description=description, + account=account, + is_oauth=is_oauth, + ) + + listable_variable.additional_properties = d + return listable_variable + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/listable_variable_extra_perms.py b/python-client/windmill-api/windmill_api/models/listable_variable_extra_perms.py new file mode 100644 index 0000000000..38ba49c47c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/listable_variable_extra_perms.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ListableVariableExtraPerms") + + +@attr.s(auto_attribs=True) +class ListableVariableExtraPerms: + """ """ + + additional_properties: Dict[str, bool] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + listable_variable_extra_perms = cls() + + listable_variable_extra_perms.additional_properties = d + return listable_variable_extra_perms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> bool: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: bool) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/login.py b/python-client/windmill-api/windmill_api/models/login.py new file mode 100644 index 0000000000..270570bf05 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/login.py @@ -0,0 +1,64 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="Login") + + +@attr.s(auto_attribs=True) +class Login: + """ + Attributes: + email (str): + password (str): + """ + + email: str + password: str + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + email = self.email + password = self.password + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "email": email, + "password": password, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + email = d.pop("email") + + password = d.pop("password") + + login = cls( + email=email, + password=password, + ) + + login.additional_properties = d + return login + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/login_json_body.py b/python-client/windmill-api/windmill_api/models/login_json_body.py new file mode 100644 index 0000000000..21d964686d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/login_json_body.py @@ -0,0 +1,64 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="LoginJsonBody") + + +@attr.s(auto_attribs=True) +class LoginJsonBody: + """ + Attributes: + email (str): + password (str): + """ + + email: str + password: str + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + email = self.email + password = self.password + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "email": email, + "password": password, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + email = d.pop("email") + + password = d.pop("password") + + login_json_body = cls( + email=email, + password=password, + ) + + login_json_body.additional_properties = d + return login_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/login_with_oauth_json_body.py b/python-client/windmill-api/windmill_api/models/login_with_oauth_json_body.py new file mode 100644 index 0000000000..eb7b10fef1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/login_with_oauth_json_body.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LoginWithOauthJsonBody") + + +@attr.s(auto_attribs=True) +class LoginWithOauthJsonBody: + """ + Attributes: + code (Union[Unset, str]): + state (Union[Unset, str]): + """ + + code: Union[Unset, str] = UNSET + state: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code = self.code + state = self.state + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if state is not UNSET: + field_dict["state"] = state + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + code = d.pop("code", UNSET) + + state = d.pop("state", UNSET) + + login_with_oauth_json_body = cls( + code=code, + state=state, + ) + + login_with_oauth_json_body.additional_properties = d + return login_with_oauth_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/main_arg_signature.py b/python-client/windmill-api/windmill_api/models/main_arg_signature.py new file mode 100644 index 0000000000..61b3eb14b1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/main_arg_signature.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.main_arg_signature_args_item import MainArgSignatureArgsItem +from ..types import UNSET, Unset + +T = TypeVar("T", bound="MainArgSignature") + + +@attr.s(auto_attribs=True) +class MainArgSignature: + """ + Attributes: + star_args (bool): + args (List[MainArgSignatureArgsItem]): + star_kwargs (Union[Unset, bool]): + """ + + star_args: bool + args: List[MainArgSignatureArgsItem] + star_kwargs: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + star_args = self.star_args + args = [] + for args_item_data in self.args: + args_item = args_item_data.to_dict() + + args.append(args_item) + + star_kwargs = self.star_kwargs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "star_args": star_args, + "args": args, + } + ) + if star_kwargs is not UNSET: + field_dict["star_kwargs"] = star_kwargs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + star_args = d.pop("star_args") + + args = [] + _args = d.pop("args") + for args_item_data in _args: + args_item = MainArgSignatureArgsItem.from_dict(args_item_data) + + args.append(args_item) + + star_kwargs = d.pop("star_kwargs", UNSET) + + main_arg_signature = cls( + star_args=star_args, + args=args, + star_kwargs=star_kwargs, + ) + + main_arg_signature.additional_properties = d + return main_arg_signature + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item.py b/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item.py new file mode 100644 index 0000000000..128d121ef5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item.py @@ -0,0 +1,156 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.main_arg_signature_args_item_typ_type_0 import MainArgSignatureArgsItemTypType0 +from ..models.main_arg_signature_args_item_typ_type_1 import MainArgSignatureArgsItemTypType1 +from ..models.main_arg_signature_args_item_typ_type_2 import MainArgSignatureArgsItemTypType2 +from ..models.main_arg_signature_args_item_typ_type_3 import MainArgSignatureArgsItemTypType3 +from ..models.main_arg_signature_args_item_typ_type_4 import MainArgSignatureArgsItemTypType4 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="MainArgSignatureArgsItem") + + +@attr.s(auto_attribs=True) +class MainArgSignatureArgsItem: + """ + Attributes: + name (str): + typ (Union[MainArgSignatureArgsItemTypType0, MainArgSignatureArgsItemTypType1, MainArgSignatureArgsItemTypType2, + MainArgSignatureArgsItemTypType3, MainArgSignatureArgsItemTypType4]): + has_default (Union[Unset, bool]): + default (Union[Unset, Any]): + """ + + name: str + typ: Union[ + MainArgSignatureArgsItemTypType0, + MainArgSignatureArgsItemTypType1, + MainArgSignatureArgsItemTypType2, + MainArgSignatureArgsItemTypType3, + MainArgSignatureArgsItemTypType4, + ] + has_default: Union[Unset, bool] = UNSET + default: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + + if isinstance(self.typ, MainArgSignatureArgsItemTypType0): + typ = self.typ.value + + elif isinstance(self.typ, MainArgSignatureArgsItemTypType1): + typ = self.typ.to_dict() + + elif isinstance(self.typ, MainArgSignatureArgsItemTypType2): + typ = self.typ.to_dict() + + elif isinstance(self.typ, MainArgSignatureArgsItemTypType3): + typ = self.typ.to_dict() + + else: + typ = self.typ.to_dict() + + has_default = self.has_default + default = self.default + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "typ": typ, + } + ) + if has_default is not UNSET: + field_dict["has_default"] = has_default + if default is not UNSET: + field_dict["default"] = default + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name") + + def _parse_typ( + data: object, + ) -> Union[ + MainArgSignatureArgsItemTypType0, + MainArgSignatureArgsItemTypType1, + MainArgSignatureArgsItemTypType2, + MainArgSignatureArgsItemTypType3, + MainArgSignatureArgsItemTypType4, + ]: + try: + if not isinstance(data, str): + raise TypeError() + typ_type_0 = MainArgSignatureArgsItemTypType0(data) + + return typ_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + typ_type_1 = MainArgSignatureArgsItemTypType1.from_dict(data) + + return typ_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + typ_type_2 = MainArgSignatureArgsItemTypType2.from_dict(data) + + return typ_type_2 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + typ_type_3 = MainArgSignatureArgsItemTypType3.from_dict(data) + + return typ_type_3 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + typ_type_4 = MainArgSignatureArgsItemTypType4.from_dict(data) + + return typ_type_4 + + typ = _parse_typ(d.pop("typ")) + + has_default = d.pop("has_default", UNSET) + + default = d.pop("default", UNSET) + + main_arg_signature_args_item = cls( + name=name, + typ=typ, + has_default=has_default, + default=default, + ) + + main_arg_signature_args_item.additional_properties = d + return main_arg_signature_args_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_0.py b/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_0.py new file mode 100644 index 0000000000..38a4ef04fa --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_0.py @@ -0,0 +1,16 @@ +from enum import Enum + + +class MainArgSignatureArgsItemTypType0(str, Enum): + FLOAT = "float" + INT = "int" + BOOL = "bool" + EMAIL = "email" + UNKNOWN = "unknown" + BYTES = "bytes" + DICT = "dict" + DATETIME = "datetime" + SQL = "sql" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_1.py b/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_1.py new file mode 100644 index 0000000000..0e80846988 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_1.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Optional, Type, TypeVar + +import attr + +T = TypeVar("T", bound="MainArgSignatureArgsItemTypType1") + + +@attr.s(auto_attribs=True) +class MainArgSignatureArgsItemTypType1: + """ + Attributes: + resource (Optional[str]): + """ + + resource: Optional[str] + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + resource = self.resource + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "resource": resource, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + resource = d.pop("resource") + + main_arg_signature_args_item_typ_type_1 = cls( + resource=resource, + ) + + main_arg_signature_args_item_typ_type_1.additional_properties = d + return main_arg_signature_args_item_typ_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_2.py b/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_2.py new file mode 100644 index 0000000000..f7208dd484 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_2.py @@ -0,0 +1,60 @@ +from typing import Any, Dict, List, Optional, Type, TypeVar, cast + +import attr + +T = TypeVar("T", bound="MainArgSignatureArgsItemTypType2") + + +@attr.s(auto_attribs=True) +class MainArgSignatureArgsItemTypType2: + """ + Attributes: + str_ (Optional[List[str]]): + """ + + str_: Optional[List[str]] + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if self.str_ is None: + str_ = None + else: + str_ = self.str_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "str": str_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + str_ = cast(List[str], d.pop("str")) + + main_arg_signature_args_item_typ_type_2 = cls( + str_=str_, + ) + + main_arg_signature_args_item_typ_type_2.additional_properties = d + return main_arg_signature_args_item_typ_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_3.py b/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_3.py new file mode 100644 index 0000000000..84a97e27d4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_3.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.main_arg_signature_args_item_typ_type_3_object_item import MainArgSignatureArgsItemTypType3ObjectItem + +T = TypeVar("T", bound="MainArgSignatureArgsItemTypType3") + + +@attr.s(auto_attribs=True) +class MainArgSignatureArgsItemTypType3: + """ + Attributes: + object_ (List[MainArgSignatureArgsItemTypType3ObjectItem]): + """ + + object_: List[MainArgSignatureArgsItemTypType3ObjectItem] + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + object_ = [] + for object_item_data in self.object_: + object_item = object_item_data.to_dict() + + object_.append(object_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "object": object_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + object_ = [] + _object_ = d.pop("object") + for object_item_data in _object_: + object_item = MainArgSignatureArgsItemTypType3ObjectItem.from_dict(object_item_data) + + object_.append(object_item) + + main_arg_signature_args_item_typ_type_3 = cls( + object_=object_, + ) + + main_arg_signature_args_item_typ_type_3.additional_properties = d + return main_arg_signature_args_item_typ_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_3_object_item.py b/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_3_object_item.py new file mode 100644 index 0000000000..955aaa266b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_3_object_item.py @@ -0,0 +1,96 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.main_arg_signature_args_item_typ_type_3_object_item_typ_type_0 import ( + MainArgSignatureArgsItemTypType3ObjectItemTypType0, +) +from ..models.main_arg_signature_args_item_typ_type_3_object_item_typ_type_1 import ( + MainArgSignatureArgsItemTypType3ObjectItemTypType1, +) + +T = TypeVar("T", bound="MainArgSignatureArgsItemTypType3ObjectItem") + + +@attr.s(auto_attribs=True) +class MainArgSignatureArgsItemTypType3ObjectItem: + """ + Attributes: + key (str): + typ (Union[MainArgSignatureArgsItemTypType3ObjectItemTypType0, + MainArgSignatureArgsItemTypType3ObjectItemTypType1]): + """ + + key: str + typ: Union[MainArgSignatureArgsItemTypType3ObjectItemTypType0, MainArgSignatureArgsItemTypType3ObjectItemTypType1] + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + key = self.key + + if isinstance(self.typ, MainArgSignatureArgsItemTypType3ObjectItemTypType0): + typ = self.typ.value + + else: + typ = self.typ.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "key": key, + "typ": typ, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + key = d.pop("key") + + def _parse_typ( + data: object, + ) -> Union[ + MainArgSignatureArgsItemTypType3ObjectItemTypType0, MainArgSignatureArgsItemTypType3ObjectItemTypType1 + ]: + try: + if not isinstance(data, str): + raise TypeError() + typ_type_0 = MainArgSignatureArgsItemTypType3ObjectItemTypType0(data) + + return typ_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + typ_type_1 = MainArgSignatureArgsItemTypType3ObjectItemTypType1.from_dict(data) + + return typ_type_1 + + typ = _parse_typ(d.pop("typ")) + + main_arg_signature_args_item_typ_type_3_object_item = cls( + key=key, + typ=typ, + ) + + main_arg_signature_args_item_typ_type_3_object_item.additional_properties = d + return main_arg_signature_args_item_typ_type_3_object_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_3_object_item_typ_type_0.py b/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_3_object_item_typ_type_0.py new file mode 100644 index 0000000000..df5a30ced2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_3_object_item_typ_type_0.py @@ -0,0 +1,16 @@ +from enum import Enum + + +class MainArgSignatureArgsItemTypType3ObjectItemTypType0(str, Enum): + FLOAT = "float" + INT = "int" + BOOL = "bool" + EMAIL = "email" + UNKNOWN = "unknown" + BYTES = "bytes" + DICT = "dict" + DATETIME = "datetime" + SQL = "sql" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_3_object_item_typ_type_1.py b/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_3_object_item_typ_type_1.py new file mode 100644 index 0000000000..234e9668f6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_3_object_item_typ_type_1.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="MainArgSignatureArgsItemTypType3ObjectItemTypType1") + + +@attr.s(auto_attribs=True) +class MainArgSignatureArgsItemTypType3ObjectItemTypType1: + """ + Attributes: + str_ (Any): + """ + + str_: Any + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + str_ = self.str_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "str": str_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + str_ = d.pop("str") + + main_arg_signature_args_item_typ_type_3_object_item_typ_type_1 = cls( + str_=str_, + ) + + main_arg_signature_args_item_typ_type_3_object_item_typ_type_1.additional_properties = d + return main_arg_signature_args_item_typ_type_3_object_item_typ_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_4.py b/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_4.py new file mode 100644 index 0000000000..75526d1f6d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_4.py @@ -0,0 +1,88 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.main_arg_signature_args_item_typ_type_4_list_type_0 import MainArgSignatureArgsItemTypType4ListType0 +from ..models.main_arg_signature_args_item_typ_type_4_list_type_1 import MainArgSignatureArgsItemTypType4ListType1 + +T = TypeVar("T", bound="MainArgSignatureArgsItemTypType4") + + +@attr.s(auto_attribs=True) +class MainArgSignatureArgsItemTypType4: + """ + Attributes: + list_ (Union[MainArgSignatureArgsItemTypType4ListType0, MainArgSignatureArgsItemTypType4ListType1, None]): + """ + + list_: Union[MainArgSignatureArgsItemTypType4ListType0, MainArgSignatureArgsItemTypType4ListType1, None] + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + list_: Union[Dict[str, Any], None, str] + if self.list_ is None: + list_ = None + + elif isinstance(self.list_, MainArgSignatureArgsItemTypType4ListType0): + list_ = self.list_.value + + else: + list_ = self.list_.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "list": list_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_list_( + data: object, + ) -> Union[MainArgSignatureArgsItemTypType4ListType0, MainArgSignatureArgsItemTypType4ListType1, None]: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + list_type_0 = MainArgSignatureArgsItemTypType4ListType0(data) + + return list_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + list_type_1 = MainArgSignatureArgsItemTypType4ListType1.from_dict(data) + + return list_type_1 + + list_ = _parse_list_(d.pop("list")) + + main_arg_signature_args_item_typ_type_4 = cls( + list_=list_, + ) + + main_arg_signature_args_item_typ_type_4.additional_properties = d + return main_arg_signature_args_item_typ_type_4 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_4_list_type_0.py b/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_4_list_type_0.py new file mode 100644 index 0000000000..444c9e708b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_4_list_type_0.py @@ -0,0 +1,16 @@ +from enum import Enum + + +class MainArgSignatureArgsItemTypType4ListType0(str, Enum): + FLOAT = "float" + INT = "int" + BOOL = "bool" + EMAIL = "email" + UNKNOWN = "unknown" + BYTES = "bytes" + DICT = "dict" + DATETIME = "datetime" + SQL = "sql" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_4_list_type_1.py b/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_4_list_type_1.py new file mode 100644 index 0000000000..f1580569ef --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/main_arg_signature_args_item_typ_type_4_list_type_1.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="MainArgSignatureArgsItemTypType4ListType1") + + +@attr.s(auto_attribs=True) +class MainArgSignatureArgsItemTypType4ListType1: + """ + Attributes: + str_ (Any): + """ + + str_: Any + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + str_ = self.str_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "str": str_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + str_ = d.pop("str") + + main_arg_signature_args_item_typ_type_4_list_type_1 = cls( + str_=str_, + ) + + main_arg_signature_args_item_typ_type_4_list_type_1.additional_properties = d + return main_arg_signature_args_item_typ_type_4_list_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/new_schedule.py b/python-client/windmill-api/windmill_api/models/new_schedule.py new file mode 100644 index 0000000000..b4ca66edac --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/new_schedule.py @@ -0,0 +1,105 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.new_schedule_args import NewScheduleArgs +from ..types import UNSET, Unset + +T = TypeVar("T", bound="NewSchedule") + + +@attr.s(auto_attribs=True) +class NewSchedule: + """ + Attributes: + path (str): + schedule (str): + script_path (str): + is_flow (bool): + args (NewScheduleArgs): + offset (Union[Unset, int]): + enabled (Union[Unset, bool]): + """ + + path: str + schedule: str + script_path: str + is_flow: bool + args: NewScheduleArgs + offset: Union[Unset, int] = UNSET + enabled: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + schedule = self.schedule + script_path = self.script_path + is_flow = self.is_flow + args = self.args.to_dict() + + offset = self.offset + enabled = self.enabled + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "schedule": schedule, + "script_path": script_path, + "is_flow": is_flow, + "args": args, + } + ) + if offset is not UNSET: + field_dict["offset"] = offset + if enabled is not UNSET: + field_dict["enabled"] = enabled + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + schedule = d.pop("schedule") + + script_path = d.pop("script_path") + + is_flow = d.pop("is_flow") + + args = NewScheduleArgs.from_dict(d.pop("args")) + + offset = d.pop("offset", UNSET) + + enabled = d.pop("enabled", UNSET) + + new_schedule = cls( + path=path, + schedule=schedule, + script_path=script_path, + is_flow=is_flow, + args=args, + offset=offset, + enabled=enabled, + ) + + new_schedule.additional_properties = d + return new_schedule + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/new_schedule_args.py b/python-client/windmill-api/windmill_api/models/new_schedule_args.py new file mode 100644 index 0000000000..5c10238cc9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/new_schedule_args.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="NewScheduleArgs") + + +@attr.s(auto_attribs=True) +class NewScheduleArgs: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + new_schedule_args = cls() + + new_schedule_args.additional_properties = d + return new_schedule_args + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/new_token.py b/python-client/windmill-api/windmill_api/models/new_token.py new file mode 100644 index 0000000000..765df3d242 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/new_token.py @@ -0,0 +1,74 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="NewToken") + + +@attr.s(auto_attribs=True) +class NewToken: + """ + Attributes: + label (Union[Unset, str]): + expiration (Union[Unset, datetime.datetime]): + """ + + label: Union[Unset, str] = UNSET + expiration: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + label = self.label + expiration: Union[Unset, str] = UNSET + if not isinstance(self.expiration, Unset): + expiration = self.expiration.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if label is not UNSET: + field_dict["label"] = label + if expiration is not UNSET: + field_dict["expiration"] = expiration + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + label = d.pop("label", UNSET) + + _expiration = d.pop("expiration", UNSET) + expiration: Union[Unset, datetime.datetime] + if isinstance(_expiration, Unset): + expiration = UNSET + else: + expiration = isoparse(_expiration) + + new_token = cls( + label=label, + expiration=expiration, + ) + + new_token.additional_properties = d + return new_token + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/new_user.py b/python-client/windmill-api/windmill_api/models/new_user.py new file mode 100644 index 0000000000..7cbbc6b32c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/new_user.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="NewUser") + + +@attr.s(auto_attribs=True) +class NewUser: + """ + Attributes: + email (str): + username (str): + is_admin (bool): + """ + + email: str + username: str + is_admin: bool + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + email = self.email + username = self.username + is_admin = self.is_admin + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "email": email, + "username": username, + "is_admin": is_admin, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + email = d.pop("email") + + username = d.pop("username") + + is_admin = d.pop("is_admin") + + new_user = cls( + email=email, + username=username, + is_admin=is_admin, + ) + + new_user.additional_properties = d + return new_user + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow.py b/python-client/windmill-api/windmill_api/models/open_flow.py new file mode 100644 index 0000000000..a838736dc2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow.py @@ -0,0 +1,92 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_schema import OpenFlowSchema +from ..models.open_flow_value import OpenFlowValue +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlow") + + +@attr.s(auto_attribs=True) +class OpenFlow: + """ + Attributes: + summary (str): + value (OpenFlowValue): + description (Union[Unset, str]): + schema (Union[Unset, OpenFlowSchema]): + """ + + summary: str + value: OpenFlowValue + description: Union[Unset, str] = UNSET + schema: Union[Unset, OpenFlowSchema] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + summary = self.summary + value = self.value.to_dict() + + description = self.description + schema: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.schema, Unset): + schema = self.schema.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "summary": summary, + "value": value, + } + ) + if description is not UNSET: + field_dict["description"] = description + if schema is not UNSET: + field_dict["schema"] = schema + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + summary = d.pop("summary") + + value = OpenFlowValue.from_dict(d.pop("value")) + + description = d.pop("description", UNSET) + + _schema = d.pop("schema", UNSET) + schema: Union[Unset, OpenFlowSchema] + if isinstance(_schema, Unset): + schema = UNSET + else: + schema = OpenFlowSchema.from_dict(_schema) + + open_flow = cls( + summary=summary, + value=value, + description=description, + schema=schema, + ) + + open_flow.additional_properties = d + return open_flow + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_schema.py b/python-client/windmill-api/windmill_api/models/open_flow_schema.py new file mode 100644 index 0000000000..0c31872097 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_schema.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="OpenFlowSchema") + + +@attr.s(auto_attribs=True) +class OpenFlowSchema: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + open_flow_schema = cls() + + open_flow_schema.additional_properties = d + return open_flow_schema + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value.py b/python-client/windmill-api/windmill_api/models/open_flow_value.py new file mode 100644 index 0000000000..823e1cbe2c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value.py @@ -0,0 +1,95 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_value_failure_module import OpenFlowValueFailureModule +from ..models.open_flow_value_modules_item import OpenFlowValueModulesItem +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowValue") + + +@attr.s(auto_attribs=True) +class OpenFlowValue: + """ + Attributes: + modules (List[OpenFlowValueModulesItem]): + failure_module (Union[Unset, OpenFlowValueFailureModule]): + same_worker (Union[Unset, bool]): + """ + + modules: List[OpenFlowValueModulesItem] + failure_module: Union[Unset, OpenFlowValueFailureModule] = UNSET + same_worker: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + modules = [] + for modules_item_data in self.modules: + modules_item = modules_item_data.to_dict() + + modules.append(modules_item) + + failure_module: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.failure_module, Unset): + failure_module = self.failure_module.to_dict() + + same_worker = self.same_worker + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "modules": modules, + } + ) + if failure_module is not UNSET: + field_dict["failure_module"] = failure_module + if same_worker is not UNSET: + field_dict["same_worker"] = same_worker + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + modules = [] + _modules = d.pop("modules") + for modules_item_data in _modules: + modules_item = OpenFlowValueModulesItem.from_dict(modules_item_data) + + modules.append(modules_item) + + _failure_module = d.pop("failure_module", UNSET) + failure_module: Union[Unset, OpenFlowValueFailureModule] + if isinstance(_failure_module, Unset): + failure_module = UNSET + else: + failure_module = OpenFlowValueFailureModule.from_dict(_failure_module) + + same_worker = d.pop("same_worker", UNSET) + + open_flow_value = cls( + modules=modules, + failure_module=failure_module, + same_worker=same_worker, + ) + + open_flow_value.additional_properties = d + return open_flow_value + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module.py new file mode 100644 index 0000000000..ea42d9618c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module.py @@ -0,0 +1,228 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_value_failure_module_input_transforms import OpenFlowValueFailureModuleInputTransforms +from ..models.open_flow_value_failure_module_retry import OpenFlowValueFailureModuleRetry +from ..models.open_flow_value_failure_module_sleep_type_0 import OpenFlowValueFailureModuleSleepType0 +from ..models.open_flow_value_failure_module_sleep_type_1 import OpenFlowValueFailureModuleSleepType1 +from ..models.open_flow_value_failure_module_stop_after_if import OpenFlowValueFailureModuleStopAfterIf +from ..models.open_flow_value_failure_module_value_type_0 import OpenFlowValueFailureModuleValueType0 +from ..models.open_flow_value_failure_module_value_type_1 import OpenFlowValueFailureModuleValueType1 +from ..models.open_flow_value_failure_module_value_type_2 import OpenFlowValueFailureModuleValueType2 +from ..models.open_flow_value_failure_module_value_type_3 import OpenFlowValueFailureModuleValueType3 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowValueFailureModule") + + +@attr.s(auto_attribs=True) +class OpenFlowValueFailureModule: + """ + Attributes: + input_transforms (OpenFlowValueFailureModuleInputTransforms): + value (Union[OpenFlowValueFailureModuleValueType0, OpenFlowValueFailureModuleValueType1, + OpenFlowValueFailureModuleValueType2, OpenFlowValueFailureModuleValueType3]): + stop_after_if (Union[Unset, OpenFlowValueFailureModuleStopAfterIf]): + sleep (Union[OpenFlowValueFailureModuleSleepType0, OpenFlowValueFailureModuleSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, OpenFlowValueFailureModuleRetry]): + """ + + input_transforms: OpenFlowValueFailureModuleInputTransforms + value: Union[ + OpenFlowValueFailureModuleValueType0, + OpenFlowValueFailureModuleValueType1, + OpenFlowValueFailureModuleValueType2, + OpenFlowValueFailureModuleValueType3, + ] + stop_after_if: Union[Unset, OpenFlowValueFailureModuleStopAfterIf] = UNSET + sleep: Union[OpenFlowValueFailureModuleSleepType0, OpenFlowValueFailureModuleSleepType1, Unset] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, OpenFlowValueFailureModuleRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, OpenFlowValueFailureModuleValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, OpenFlowValueFailureModuleValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, OpenFlowValueFailureModuleValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, OpenFlowValueFailureModuleSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = OpenFlowValueFailureModuleInputTransforms.from_dict(d.pop("input_transforms")) + + def _parse_value( + data: object, + ) -> Union[ + OpenFlowValueFailureModuleValueType0, + OpenFlowValueFailureModuleValueType1, + OpenFlowValueFailureModuleValueType2, + OpenFlowValueFailureModuleValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = OpenFlowValueFailureModuleValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = OpenFlowValueFailureModuleValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = OpenFlowValueFailureModuleValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = OpenFlowValueFailureModuleValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, OpenFlowValueFailureModuleStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = OpenFlowValueFailureModuleStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[OpenFlowValueFailureModuleSleepType0, OpenFlowValueFailureModuleSleepType1, Unset]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, OpenFlowValueFailureModuleSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = OpenFlowValueFailureModuleSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, OpenFlowValueFailureModuleSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = OpenFlowValueFailureModuleSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, OpenFlowValueFailureModuleRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = OpenFlowValueFailureModuleRetry.from_dict(_retry) + + open_flow_value_failure_module = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + open_flow_value_failure_module.additional_properties = d + return open_flow_value_failure_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_input_transforms.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_input_transforms.py new file mode 100644 index 0000000000..32cfc9236f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_input_transforms.py @@ -0,0 +1,107 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_value_failure_module_input_transforms_additional_property_type_0 import ( + OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType0, +) +from ..models.open_flow_value_failure_module_input_transforms_additional_property_type_1 import ( + OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="OpenFlowValueFailureModuleInputTransforms") + + +@attr.s(auto_attribs=True) +class OpenFlowValueFailureModuleInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType0, + OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + open_flow_value_failure_module_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType0, + OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType0.from_dict(data) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType1.from_dict( + data + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + open_flow_value_failure_module_input_transforms.additional_properties = additional_properties + return open_flow_value_failure_module_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType0, + OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType0, + OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..52b30df9cd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_input_transforms_additional_property_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_value_failure_module_input_transforms_additional_property_type_0_type import ( + OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + open_flow_value_failure_module_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + open_flow_value_failure_module_input_transforms_additional_property_type_0.additional_properties = d + return open_flow_value_failure_module_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..585515c556 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..b309304884 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_input_transforms_additional_property_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.open_flow_value_failure_module_input_transforms_additional_property_type_1_type import ( + OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + open_flow_value_failure_module_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + open_flow_value_failure_module_input_transforms_additional_property_type_1.additional_properties = d + return open_flow_value_failure_module_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..40e07a3ec2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowValueFailureModuleInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_retry.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_retry.py new file mode 100644 index 0000000000..92b9a8b82d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_retry.py @@ -0,0 +1,82 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_value_failure_module_retry_constant import OpenFlowValueFailureModuleRetryConstant +from ..models.open_flow_value_failure_module_retry_exponential import OpenFlowValueFailureModuleRetryExponential +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowValueFailureModuleRetry") + + +@attr.s(auto_attribs=True) +class OpenFlowValueFailureModuleRetry: + """ + Attributes: + constant (Union[Unset, OpenFlowValueFailureModuleRetryConstant]): + exponential (Union[Unset, OpenFlowValueFailureModuleRetryExponential]): + """ + + constant: Union[Unset, OpenFlowValueFailureModuleRetryConstant] = UNSET + exponential: Union[Unset, OpenFlowValueFailureModuleRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, OpenFlowValueFailureModuleRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = OpenFlowValueFailureModuleRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, OpenFlowValueFailureModuleRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = OpenFlowValueFailureModuleRetryExponential.from_dict(_exponential) + + open_flow_value_failure_module_retry = cls( + constant=constant, + exponential=exponential, + ) + + open_flow_value_failure_module_retry.additional_properties = d + return open_flow_value_failure_module_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_retry_constant.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_retry_constant.py new file mode 100644 index 0000000000..e2c7c4c2dd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowValueFailureModuleRetryConstant") + + +@attr.s(auto_attribs=True) +class OpenFlowValueFailureModuleRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + open_flow_value_failure_module_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + open_flow_value_failure_module_retry_constant.additional_properties = d + return open_flow_value_failure_module_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_retry_exponential.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_retry_exponential.py new file mode 100644 index 0000000000..87f724b793 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowValueFailureModuleRetryExponential") + + +@attr.s(auto_attribs=True) +class OpenFlowValueFailureModuleRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + open_flow_value_failure_module_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + open_flow_value_failure_module_retry_exponential.additional_properties = d + return open_flow_value_failure_module_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_sleep_type_0.py new file mode 100644 index 0000000000..920f07746c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_sleep_type_0.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_value_failure_module_sleep_type_0_type import OpenFlowValueFailureModuleSleepType0Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowValueFailureModuleSleepType0") + + +@attr.s(auto_attribs=True) +class OpenFlowValueFailureModuleSleepType0: + """ + Attributes: + type (OpenFlowValueFailureModuleSleepType0Type): + value (Union[Unset, Any]): + """ + + type: OpenFlowValueFailureModuleSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = OpenFlowValueFailureModuleSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + open_flow_value_failure_module_sleep_type_0 = cls( + type=type, + value=value, + ) + + open_flow_value_failure_module_sleep_type_0.additional_properties = d + return open_flow_value_failure_module_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_sleep_type_0_type.py new file mode 100644 index 0000000000..c7410f3e9f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowValueFailureModuleSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_sleep_type_1.py new file mode 100644 index 0000000000..daca8f0a1f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_sleep_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.open_flow_value_failure_module_sleep_type_1_type import OpenFlowValueFailureModuleSleepType1Type + +T = TypeVar("T", bound="OpenFlowValueFailureModuleSleepType1") + + +@attr.s(auto_attribs=True) +class OpenFlowValueFailureModuleSleepType1: + """ + Attributes: + expr (str): + type (OpenFlowValueFailureModuleSleepType1Type): + """ + + expr: str + type: OpenFlowValueFailureModuleSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = OpenFlowValueFailureModuleSleepType1Type(d.pop("type")) + + open_flow_value_failure_module_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + open_flow_value_failure_module_sleep_type_1.additional_properties = d + return open_flow_value_failure_module_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_sleep_type_1_type.py new file mode 100644 index 0000000000..d1b131ec69 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowValueFailureModuleSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_stop_after_if.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_stop_after_if.py new file mode 100644 index 0000000000..06469e291e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowValueFailureModuleStopAfterIf") + + +@attr.s(auto_attribs=True) +class OpenFlowValueFailureModuleStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + open_flow_value_failure_module_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + open_flow_value_failure_module_stop_after_if.additional_properties = d + return open_flow_value_failure_module_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_0.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_0.py new file mode 100644 index 0000000000..7688475b65 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_0.py @@ -0,0 +1,83 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_value_failure_module_value_type_0_language import OpenFlowValueFailureModuleValueType0Language +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowValueFailureModuleValueType0") + + +@attr.s(auto_attribs=True) +class OpenFlowValueFailureModuleValueType0: + """ + Attributes: + content (str): + language (OpenFlowValueFailureModuleValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: OpenFlowValueFailureModuleValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = OpenFlowValueFailureModuleValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + open_flow_value_failure_module_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + open_flow_value_failure_module_value_type_0.additional_properties = d + return open_flow_value_failure_module_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_0_language.py new file mode 100644 index 0000000000..92c4e4ba95 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class OpenFlowValueFailureModuleValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_1.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_1.py new file mode 100644 index 0000000000..bf17eaa263 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.open_flow_value_failure_module_value_type_1_type import OpenFlowValueFailureModuleValueType1Type + +T = TypeVar("T", bound="OpenFlowValueFailureModuleValueType1") + + +@attr.s(auto_attribs=True) +class OpenFlowValueFailureModuleValueType1: + """ + Attributes: + path (str): + type (OpenFlowValueFailureModuleValueType1Type): + """ + + path: str + type: OpenFlowValueFailureModuleValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = OpenFlowValueFailureModuleValueType1Type(d.pop("type")) + + open_flow_value_failure_module_value_type_1 = cls( + path=path, + type=type, + ) + + open_flow_value_failure_module_value_type_1.additional_properties = d + return open_flow_value_failure_module_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_1_type.py new file mode 100644 index 0000000000..377a5a7f51 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowValueFailureModuleValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2.py new file mode 100644 index 0000000000..6ef1062e30 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2.py @@ -0,0 +1,108 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_value_failure_module_value_type_2_iterator_type_0 import ( + OpenFlowValueFailureModuleValueType2IteratorType0, +) +from ..models.open_flow_value_failure_module_value_type_2_iterator_type_1 import ( + OpenFlowValueFailureModuleValueType2IteratorType1, +) +from ..models.open_flow_value_failure_module_value_type_2_type import OpenFlowValueFailureModuleValueType2Type + +T = TypeVar("T", bound="OpenFlowValueFailureModuleValueType2") + + +@attr.s(auto_attribs=True) +class OpenFlowValueFailureModuleValueType2: + """ + Attributes: + iterator (Union[OpenFlowValueFailureModuleValueType2IteratorType0, + OpenFlowValueFailureModuleValueType2IteratorType1]): + skip_failures (bool): + type (OpenFlowValueFailureModuleValueType2Type): + """ + + iterator: Union[ + OpenFlowValueFailureModuleValueType2IteratorType0, OpenFlowValueFailureModuleValueType2IteratorType1 + ] + skip_failures: bool + type: OpenFlowValueFailureModuleValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, OpenFlowValueFailureModuleValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + OpenFlowValueFailureModuleValueType2IteratorType0, OpenFlowValueFailureModuleValueType2IteratorType1 + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = OpenFlowValueFailureModuleValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = OpenFlowValueFailureModuleValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = OpenFlowValueFailureModuleValueType2Type(d.pop("type")) + + open_flow_value_failure_module_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + open_flow_value_failure_module_value_type_2.additional_properties = d + return open_flow_value_failure_module_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..a318a8f9ea --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_value_failure_module_value_type_2_iterator_type_0_type import ( + OpenFlowValueFailureModuleValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowValueFailureModuleValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class OpenFlowValueFailureModuleValueType2IteratorType0: + """ + Attributes: + type (OpenFlowValueFailureModuleValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: OpenFlowValueFailureModuleValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = OpenFlowValueFailureModuleValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + open_flow_value_failure_module_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + open_flow_value_failure_module_value_type_2_iterator_type_0.additional_properties = d + return open_flow_value_failure_module_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..2df32c7804 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowValueFailureModuleValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..bb2528ccc5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.open_flow_value_failure_module_value_type_2_iterator_type_1_type import ( + OpenFlowValueFailureModuleValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="OpenFlowValueFailureModuleValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class OpenFlowValueFailureModuleValueType2IteratorType1: + """ + Attributes: + expr (str): + type (OpenFlowValueFailureModuleValueType2IteratorType1Type): + """ + + expr: str + type: OpenFlowValueFailureModuleValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = OpenFlowValueFailureModuleValueType2IteratorType1Type(d.pop("type")) + + open_flow_value_failure_module_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + open_flow_value_failure_module_value_type_2_iterator_type_1.additional_properties = d + return open_flow_value_failure_module_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..a266a8be20 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowValueFailureModuleValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2_type.py new file mode 100644 index 0000000000..c87812d0b5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowValueFailureModuleValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_3.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_3.py new file mode 100644 index 0000000000..9fe980e043 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_3.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_value_failure_module_value_type_3_type import OpenFlowValueFailureModuleValueType3Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowValueFailureModuleValueType3") + + +@attr.s(auto_attribs=True) +class OpenFlowValueFailureModuleValueType3: + """ + Attributes: + type (OpenFlowValueFailureModuleValueType3Type): + path (Union[Unset, str]): + """ + + type: OpenFlowValueFailureModuleValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = OpenFlowValueFailureModuleValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + open_flow_value_failure_module_value_type_3 = cls( + type=type, + path=path, + ) + + open_flow_value_failure_module_value_type_3.additional_properties = d + return open_flow_value_failure_module_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_3_type.py new file mode 100644 index 0000000000..5970436131 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_failure_module_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowValueFailureModuleValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item.py new file mode 100644 index 0000000000..b652a11faa --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item.py @@ -0,0 +1,228 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_value_modules_item_input_transforms import OpenFlowValueModulesItemInputTransforms +from ..models.open_flow_value_modules_item_retry import OpenFlowValueModulesItemRetry +from ..models.open_flow_value_modules_item_sleep_type_0 import OpenFlowValueModulesItemSleepType0 +from ..models.open_flow_value_modules_item_sleep_type_1 import OpenFlowValueModulesItemSleepType1 +from ..models.open_flow_value_modules_item_stop_after_if import OpenFlowValueModulesItemStopAfterIf +from ..models.open_flow_value_modules_item_value_type_0 import OpenFlowValueModulesItemValueType0 +from ..models.open_flow_value_modules_item_value_type_1 import OpenFlowValueModulesItemValueType1 +from ..models.open_flow_value_modules_item_value_type_2 import OpenFlowValueModulesItemValueType2 +from ..models.open_flow_value_modules_item_value_type_3 import OpenFlowValueModulesItemValueType3 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowValueModulesItem") + + +@attr.s(auto_attribs=True) +class OpenFlowValueModulesItem: + """ + Attributes: + input_transforms (OpenFlowValueModulesItemInputTransforms): + value (Union[OpenFlowValueModulesItemValueType0, OpenFlowValueModulesItemValueType1, + OpenFlowValueModulesItemValueType2, OpenFlowValueModulesItemValueType3]): + stop_after_if (Union[Unset, OpenFlowValueModulesItemStopAfterIf]): + sleep (Union[OpenFlowValueModulesItemSleepType0, OpenFlowValueModulesItemSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, OpenFlowValueModulesItemRetry]): + """ + + input_transforms: OpenFlowValueModulesItemInputTransforms + value: Union[ + OpenFlowValueModulesItemValueType0, + OpenFlowValueModulesItemValueType1, + OpenFlowValueModulesItemValueType2, + OpenFlowValueModulesItemValueType3, + ] + stop_after_if: Union[Unset, OpenFlowValueModulesItemStopAfterIf] = UNSET + sleep: Union[OpenFlowValueModulesItemSleepType0, OpenFlowValueModulesItemSleepType1, Unset] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, OpenFlowValueModulesItemRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, OpenFlowValueModulesItemValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, OpenFlowValueModulesItemValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, OpenFlowValueModulesItemValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, OpenFlowValueModulesItemSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = OpenFlowValueModulesItemInputTransforms.from_dict(d.pop("input_transforms")) + + def _parse_value( + data: object, + ) -> Union[ + OpenFlowValueModulesItemValueType0, + OpenFlowValueModulesItemValueType1, + OpenFlowValueModulesItemValueType2, + OpenFlowValueModulesItemValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = OpenFlowValueModulesItemValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = OpenFlowValueModulesItemValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = OpenFlowValueModulesItemValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = OpenFlowValueModulesItemValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, OpenFlowValueModulesItemStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = OpenFlowValueModulesItemStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[OpenFlowValueModulesItemSleepType0, OpenFlowValueModulesItemSleepType1, Unset]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, OpenFlowValueModulesItemSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = OpenFlowValueModulesItemSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, OpenFlowValueModulesItemSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = OpenFlowValueModulesItemSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, OpenFlowValueModulesItemRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = OpenFlowValueModulesItemRetry.from_dict(_retry) + + open_flow_value_modules_item = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + open_flow_value_modules_item.additional_properties = d + return open_flow_value_modules_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_input_transforms.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_input_transforms.py new file mode 100644 index 0000000000..cb0e01ef15 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_input_transforms.py @@ -0,0 +1,107 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_value_modules_item_input_transforms_additional_property_type_0 import ( + OpenFlowValueModulesItemInputTransformsAdditionalPropertyType0, +) +from ..models.open_flow_value_modules_item_input_transforms_additional_property_type_1 import ( + OpenFlowValueModulesItemInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="OpenFlowValueModulesItemInputTransforms") + + +@attr.s(auto_attribs=True) +class OpenFlowValueModulesItemInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + OpenFlowValueModulesItemInputTransformsAdditionalPropertyType0, + OpenFlowValueModulesItemInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, OpenFlowValueModulesItemInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + open_flow_value_modules_item_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + OpenFlowValueModulesItemInputTransformsAdditionalPropertyType0, + OpenFlowValueModulesItemInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + OpenFlowValueModulesItemInputTransformsAdditionalPropertyType0.from_dict(data) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = OpenFlowValueModulesItemInputTransformsAdditionalPropertyType1.from_dict( + data + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + open_flow_value_modules_item_input_transforms.additional_properties = additional_properties + return open_flow_value_modules_item_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + OpenFlowValueModulesItemInputTransformsAdditionalPropertyType0, + OpenFlowValueModulesItemInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + OpenFlowValueModulesItemInputTransformsAdditionalPropertyType0, + OpenFlowValueModulesItemInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..ca58c2b90f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_input_transforms_additional_property_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_value_modules_item_input_transforms_additional_property_type_0_type import ( + OpenFlowValueModulesItemInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowValueModulesItemInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class OpenFlowValueModulesItemInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (OpenFlowValueModulesItemInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: OpenFlowValueModulesItemInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = OpenFlowValueModulesItemInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + open_flow_value_modules_item_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + open_flow_value_modules_item_input_transforms_additional_property_type_0.additional_properties = d + return open_flow_value_modules_item_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..2ef76e10ad --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowValueModulesItemInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..1338393150 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_input_transforms_additional_property_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.open_flow_value_modules_item_input_transforms_additional_property_type_1_type import ( + OpenFlowValueModulesItemInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="OpenFlowValueModulesItemInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class OpenFlowValueModulesItemInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (OpenFlowValueModulesItemInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: OpenFlowValueModulesItemInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = OpenFlowValueModulesItemInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + open_flow_value_modules_item_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + open_flow_value_modules_item_input_transforms_additional_property_type_1.additional_properties = d + return open_flow_value_modules_item_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..f39a2e8a64 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowValueModulesItemInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_retry.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_retry.py new file mode 100644 index 0000000000..aefbfd0ae2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_retry.py @@ -0,0 +1,82 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_value_modules_item_retry_constant import OpenFlowValueModulesItemRetryConstant +from ..models.open_flow_value_modules_item_retry_exponential import OpenFlowValueModulesItemRetryExponential +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowValueModulesItemRetry") + + +@attr.s(auto_attribs=True) +class OpenFlowValueModulesItemRetry: + """ + Attributes: + constant (Union[Unset, OpenFlowValueModulesItemRetryConstant]): + exponential (Union[Unset, OpenFlowValueModulesItemRetryExponential]): + """ + + constant: Union[Unset, OpenFlowValueModulesItemRetryConstant] = UNSET + exponential: Union[Unset, OpenFlowValueModulesItemRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, OpenFlowValueModulesItemRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = OpenFlowValueModulesItemRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, OpenFlowValueModulesItemRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = OpenFlowValueModulesItemRetryExponential.from_dict(_exponential) + + open_flow_value_modules_item_retry = cls( + constant=constant, + exponential=exponential, + ) + + open_flow_value_modules_item_retry.additional_properties = d + return open_flow_value_modules_item_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_retry_constant.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_retry_constant.py new file mode 100644 index 0000000000..7613627887 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowValueModulesItemRetryConstant") + + +@attr.s(auto_attribs=True) +class OpenFlowValueModulesItemRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + open_flow_value_modules_item_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + open_flow_value_modules_item_retry_constant.additional_properties = d + return open_flow_value_modules_item_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_retry_exponential.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_retry_exponential.py new file mode 100644 index 0000000000..c7c646db64 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowValueModulesItemRetryExponential") + + +@attr.s(auto_attribs=True) +class OpenFlowValueModulesItemRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + open_flow_value_modules_item_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + open_flow_value_modules_item_retry_exponential.additional_properties = d + return open_flow_value_modules_item_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_sleep_type_0.py new file mode 100644 index 0000000000..ba2b2fb66b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_sleep_type_0.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_value_modules_item_sleep_type_0_type import OpenFlowValueModulesItemSleepType0Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowValueModulesItemSleepType0") + + +@attr.s(auto_attribs=True) +class OpenFlowValueModulesItemSleepType0: + """ + Attributes: + type (OpenFlowValueModulesItemSleepType0Type): + value (Union[Unset, Any]): + """ + + type: OpenFlowValueModulesItemSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = OpenFlowValueModulesItemSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + open_flow_value_modules_item_sleep_type_0 = cls( + type=type, + value=value, + ) + + open_flow_value_modules_item_sleep_type_0.additional_properties = d + return open_flow_value_modules_item_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_sleep_type_0_type.py new file mode 100644 index 0000000000..74363102b7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowValueModulesItemSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_sleep_type_1.py new file mode 100644 index 0000000000..eb20d36e89 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_sleep_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.open_flow_value_modules_item_sleep_type_1_type import OpenFlowValueModulesItemSleepType1Type + +T = TypeVar("T", bound="OpenFlowValueModulesItemSleepType1") + + +@attr.s(auto_attribs=True) +class OpenFlowValueModulesItemSleepType1: + """ + Attributes: + expr (str): + type (OpenFlowValueModulesItemSleepType1Type): + """ + + expr: str + type: OpenFlowValueModulesItemSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = OpenFlowValueModulesItemSleepType1Type(d.pop("type")) + + open_flow_value_modules_item_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + open_flow_value_modules_item_sleep_type_1.additional_properties = d + return open_flow_value_modules_item_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_sleep_type_1_type.py new file mode 100644 index 0000000000..d730913c71 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowValueModulesItemSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_stop_after_if.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_stop_after_if.py new file mode 100644 index 0000000000..58400bcc90 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowValueModulesItemStopAfterIf") + + +@attr.s(auto_attribs=True) +class OpenFlowValueModulesItemStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + open_flow_value_modules_item_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + open_flow_value_modules_item_stop_after_if.additional_properties = d + return open_flow_value_modules_item_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_0.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_0.py new file mode 100644 index 0000000000..45c45fa13e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_0.py @@ -0,0 +1,83 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_value_modules_item_value_type_0_language import OpenFlowValueModulesItemValueType0Language +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowValueModulesItemValueType0") + + +@attr.s(auto_attribs=True) +class OpenFlowValueModulesItemValueType0: + """ + Attributes: + content (str): + language (OpenFlowValueModulesItemValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: OpenFlowValueModulesItemValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = OpenFlowValueModulesItemValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + open_flow_value_modules_item_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + open_flow_value_modules_item_value_type_0.additional_properties = d + return open_flow_value_modules_item_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_0_language.py new file mode 100644 index 0000000000..d323db98fb --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class OpenFlowValueModulesItemValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_1.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_1.py new file mode 100644 index 0000000000..0609ff8891 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.open_flow_value_modules_item_value_type_1_type import OpenFlowValueModulesItemValueType1Type + +T = TypeVar("T", bound="OpenFlowValueModulesItemValueType1") + + +@attr.s(auto_attribs=True) +class OpenFlowValueModulesItemValueType1: + """ + Attributes: + path (str): + type (OpenFlowValueModulesItemValueType1Type): + """ + + path: str + type: OpenFlowValueModulesItemValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = OpenFlowValueModulesItemValueType1Type(d.pop("type")) + + open_flow_value_modules_item_value_type_1 = cls( + path=path, + type=type, + ) + + open_flow_value_modules_item_value_type_1.additional_properties = d + return open_flow_value_modules_item_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_1_type.py new file mode 100644 index 0000000000..362bdbf7b1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowValueModulesItemValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2.py new file mode 100644 index 0000000000..5bfac4b18a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2.py @@ -0,0 +1,104 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_value_modules_item_value_type_2_iterator_type_0 import ( + OpenFlowValueModulesItemValueType2IteratorType0, +) +from ..models.open_flow_value_modules_item_value_type_2_iterator_type_1 import ( + OpenFlowValueModulesItemValueType2IteratorType1, +) +from ..models.open_flow_value_modules_item_value_type_2_type import OpenFlowValueModulesItemValueType2Type + +T = TypeVar("T", bound="OpenFlowValueModulesItemValueType2") + + +@attr.s(auto_attribs=True) +class OpenFlowValueModulesItemValueType2: + """ + Attributes: + iterator (Union[OpenFlowValueModulesItemValueType2IteratorType0, + OpenFlowValueModulesItemValueType2IteratorType1]): + skip_failures (bool): + type (OpenFlowValueModulesItemValueType2Type): + """ + + iterator: Union[OpenFlowValueModulesItemValueType2IteratorType0, OpenFlowValueModulesItemValueType2IteratorType1] + skip_failures: bool + type: OpenFlowValueModulesItemValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, OpenFlowValueModulesItemValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[OpenFlowValueModulesItemValueType2IteratorType0, OpenFlowValueModulesItemValueType2IteratorType1]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = OpenFlowValueModulesItemValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = OpenFlowValueModulesItemValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = OpenFlowValueModulesItemValueType2Type(d.pop("type")) + + open_flow_value_modules_item_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + open_flow_value_modules_item_value_type_2.additional_properties = d + return open_flow_value_modules_item_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..c2c5f39654 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_value_modules_item_value_type_2_iterator_type_0_type import ( + OpenFlowValueModulesItemValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowValueModulesItemValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class OpenFlowValueModulesItemValueType2IteratorType0: + """ + Attributes: + type (OpenFlowValueModulesItemValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: OpenFlowValueModulesItemValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = OpenFlowValueModulesItemValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + open_flow_value_modules_item_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + open_flow_value_modules_item_value_type_2_iterator_type_0.additional_properties = d + return open_flow_value_modules_item_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..25e08a702a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowValueModulesItemValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..814aba6eaa --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.open_flow_value_modules_item_value_type_2_iterator_type_1_type import ( + OpenFlowValueModulesItemValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="OpenFlowValueModulesItemValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class OpenFlowValueModulesItemValueType2IteratorType1: + """ + Attributes: + expr (str): + type (OpenFlowValueModulesItemValueType2IteratorType1Type): + """ + + expr: str + type: OpenFlowValueModulesItemValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = OpenFlowValueModulesItemValueType2IteratorType1Type(d.pop("type")) + + open_flow_value_modules_item_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + open_flow_value_modules_item_value_type_2_iterator_type_1.additional_properties = d + return open_flow_value_modules_item_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..60f32e5711 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowValueModulesItemValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2_type.py new file mode 100644 index 0000000000..9f889cbda9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowValueModulesItemValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_3.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_3.py new file mode 100644 index 0000000000..ff08430d57 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_3.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_value_modules_item_value_type_3_type import OpenFlowValueModulesItemValueType3Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowValueModulesItemValueType3") + + +@attr.s(auto_attribs=True) +class OpenFlowValueModulesItemValueType3: + """ + Attributes: + type (OpenFlowValueModulesItemValueType3Type): + path (Union[Unset, str]): + """ + + type: OpenFlowValueModulesItemValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = OpenFlowValueModulesItemValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + open_flow_value_modules_item_value_type_3 = cls( + type=type, + path=path, + ) + + open_flow_value_modules_item_value_type_3.additional_properties = d + return open_flow_value_modules_item_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_3_type.py new file mode 100644 index 0000000000..3438755d4b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_value_modules_item_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowValueModulesItemValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path.py new file mode 100644 index 0000000000..d56e22eee9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path.py @@ -0,0 +1,99 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_w_path_schema import OpenFlowWPathSchema +from ..models.open_flow_w_path_value import OpenFlowWPathValue +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowWPath") + + +@attr.s(auto_attribs=True) +class OpenFlowWPath: + """ + Attributes: + summary (str): + value (OpenFlowWPathValue): + path (str): + description (Union[Unset, str]): + schema (Union[Unset, OpenFlowWPathSchema]): + """ + + summary: str + value: OpenFlowWPathValue + path: str + description: Union[Unset, str] = UNSET + schema: Union[Unset, OpenFlowWPathSchema] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + summary = self.summary + value = self.value.to_dict() + + path = self.path + description = self.description + schema: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.schema, Unset): + schema = self.schema.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "summary": summary, + "value": value, + "path": path, + } + ) + if description is not UNSET: + field_dict["description"] = description + if schema is not UNSET: + field_dict["schema"] = schema + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + summary = d.pop("summary") + + value = OpenFlowWPathValue.from_dict(d.pop("value")) + + path = d.pop("path") + + description = d.pop("description", UNSET) + + _schema = d.pop("schema", UNSET) + schema: Union[Unset, OpenFlowWPathSchema] + if isinstance(_schema, Unset): + schema = UNSET + else: + schema = OpenFlowWPathSchema.from_dict(_schema) + + open_flow_w_path = cls( + summary=summary, + value=value, + path=path, + description=description, + schema=schema, + ) + + open_flow_w_path.additional_properties = d + return open_flow_w_path + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_schema.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_schema.py new file mode 100644 index 0000000000..a07917e82f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_schema.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="OpenFlowWPathSchema") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathSchema: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + open_flow_w_path_schema = cls() + + open_flow_w_path_schema.additional_properties = d + return open_flow_w_path_schema + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value.py new file mode 100644 index 0000000000..29ef446eb7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value.py @@ -0,0 +1,95 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_w_path_value_failure_module import OpenFlowWPathValueFailureModule +from ..models.open_flow_w_path_value_modules_item import OpenFlowWPathValueModulesItem +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowWPathValue") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValue: + """ + Attributes: + modules (List[OpenFlowWPathValueModulesItem]): + failure_module (Union[Unset, OpenFlowWPathValueFailureModule]): + same_worker (Union[Unset, bool]): + """ + + modules: List[OpenFlowWPathValueModulesItem] + failure_module: Union[Unset, OpenFlowWPathValueFailureModule] = UNSET + same_worker: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + modules = [] + for modules_item_data in self.modules: + modules_item = modules_item_data.to_dict() + + modules.append(modules_item) + + failure_module: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.failure_module, Unset): + failure_module = self.failure_module.to_dict() + + same_worker = self.same_worker + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "modules": modules, + } + ) + if failure_module is not UNSET: + field_dict["failure_module"] = failure_module + if same_worker is not UNSET: + field_dict["same_worker"] = same_worker + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + modules = [] + _modules = d.pop("modules") + for modules_item_data in _modules: + modules_item = OpenFlowWPathValueModulesItem.from_dict(modules_item_data) + + modules.append(modules_item) + + _failure_module = d.pop("failure_module", UNSET) + failure_module: Union[Unset, OpenFlowWPathValueFailureModule] + if isinstance(_failure_module, Unset): + failure_module = UNSET + else: + failure_module = OpenFlowWPathValueFailureModule.from_dict(_failure_module) + + same_worker = d.pop("same_worker", UNSET) + + open_flow_w_path_value = cls( + modules=modules, + failure_module=failure_module, + same_worker=same_worker, + ) + + open_flow_w_path_value.additional_properties = d + return open_flow_w_path_value + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module.py new file mode 100644 index 0000000000..0098c9467e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module.py @@ -0,0 +1,230 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_w_path_value_failure_module_input_transforms import ( + OpenFlowWPathValueFailureModuleInputTransforms, +) +from ..models.open_flow_w_path_value_failure_module_retry import OpenFlowWPathValueFailureModuleRetry +from ..models.open_flow_w_path_value_failure_module_sleep_type_0 import OpenFlowWPathValueFailureModuleSleepType0 +from ..models.open_flow_w_path_value_failure_module_sleep_type_1 import OpenFlowWPathValueFailureModuleSleepType1 +from ..models.open_flow_w_path_value_failure_module_stop_after_if import OpenFlowWPathValueFailureModuleStopAfterIf +from ..models.open_flow_w_path_value_failure_module_value_type_0 import OpenFlowWPathValueFailureModuleValueType0 +from ..models.open_flow_w_path_value_failure_module_value_type_1 import OpenFlowWPathValueFailureModuleValueType1 +from ..models.open_flow_w_path_value_failure_module_value_type_2 import OpenFlowWPathValueFailureModuleValueType2 +from ..models.open_flow_w_path_value_failure_module_value_type_3 import OpenFlowWPathValueFailureModuleValueType3 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowWPathValueFailureModule") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueFailureModule: + """ + Attributes: + input_transforms (OpenFlowWPathValueFailureModuleInputTransforms): + value (Union[OpenFlowWPathValueFailureModuleValueType0, OpenFlowWPathValueFailureModuleValueType1, + OpenFlowWPathValueFailureModuleValueType2, OpenFlowWPathValueFailureModuleValueType3]): + stop_after_if (Union[Unset, OpenFlowWPathValueFailureModuleStopAfterIf]): + sleep (Union[OpenFlowWPathValueFailureModuleSleepType0, OpenFlowWPathValueFailureModuleSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, OpenFlowWPathValueFailureModuleRetry]): + """ + + input_transforms: OpenFlowWPathValueFailureModuleInputTransforms + value: Union[ + OpenFlowWPathValueFailureModuleValueType0, + OpenFlowWPathValueFailureModuleValueType1, + OpenFlowWPathValueFailureModuleValueType2, + OpenFlowWPathValueFailureModuleValueType3, + ] + stop_after_if: Union[Unset, OpenFlowWPathValueFailureModuleStopAfterIf] = UNSET + sleep: Union[OpenFlowWPathValueFailureModuleSleepType0, OpenFlowWPathValueFailureModuleSleepType1, Unset] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, OpenFlowWPathValueFailureModuleRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, OpenFlowWPathValueFailureModuleValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, OpenFlowWPathValueFailureModuleValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, OpenFlowWPathValueFailureModuleValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, OpenFlowWPathValueFailureModuleSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = OpenFlowWPathValueFailureModuleInputTransforms.from_dict(d.pop("input_transforms")) + + def _parse_value( + data: object, + ) -> Union[ + OpenFlowWPathValueFailureModuleValueType0, + OpenFlowWPathValueFailureModuleValueType1, + OpenFlowWPathValueFailureModuleValueType2, + OpenFlowWPathValueFailureModuleValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = OpenFlowWPathValueFailureModuleValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = OpenFlowWPathValueFailureModuleValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = OpenFlowWPathValueFailureModuleValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = OpenFlowWPathValueFailureModuleValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, OpenFlowWPathValueFailureModuleStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = OpenFlowWPathValueFailureModuleStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[OpenFlowWPathValueFailureModuleSleepType0, OpenFlowWPathValueFailureModuleSleepType1, Unset]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, OpenFlowWPathValueFailureModuleSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = OpenFlowWPathValueFailureModuleSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, OpenFlowWPathValueFailureModuleSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = OpenFlowWPathValueFailureModuleSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, OpenFlowWPathValueFailureModuleRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = OpenFlowWPathValueFailureModuleRetry.from_dict(_retry) + + open_flow_w_path_value_failure_module = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + open_flow_w_path_value_failure_module.additional_properties = d + return open_flow_w_path_value_failure_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_input_transforms.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_input_transforms.py new file mode 100644 index 0000000000..8c8889223c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_input_transforms.py @@ -0,0 +1,107 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_w_path_value_failure_module_input_transforms_additional_property_type_0 import ( + OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType0, +) +from ..models.open_flow_w_path_value_failure_module_input_transforms_additional_property_type_1 import ( + OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="OpenFlowWPathValueFailureModuleInputTransforms") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueFailureModuleInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType0, + OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + open_flow_w_path_value_failure_module_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType0, + OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType0.from_dict(data) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType1.from_dict(data) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + open_flow_w_path_value_failure_module_input_transforms.additional_properties = additional_properties + return open_flow_w_path_value_failure_module_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType0, + OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType0, + OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..fa06a1ba0f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_input_transforms_additional_property_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_w_path_value_failure_module_input_transforms_additional_property_type_0_type import ( + OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + open_flow_w_path_value_failure_module_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + open_flow_w_path_value_failure_module_input_transforms_additional_property_type_0.additional_properties = d + return open_flow_w_path_value_failure_module_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..286a0564a1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..c715e1c440 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_input_transforms_additional_property_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.open_flow_w_path_value_failure_module_input_transforms_additional_property_type_1_type import ( + OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + open_flow_w_path_value_failure_module_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + open_flow_w_path_value_failure_module_input_transforms_additional_property_type_1.additional_properties = d + return open_flow_w_path_value_failure_module_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..486a0a6c1b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowWPathValueFailureModuleInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_retry.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_retry.py new file mode 100644 index 0000000000..aec6c2af92 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_retry.py @@ -0,0 +1,84 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_w_path_value_failure_module_retry_constant import OpenFlowWPathValueFailureModuleRetryConstant +from ..models.open_flow_w_path_value_failure_module_retry_exponential import ( + OpenFlowWPathValueFailureModuleRetryExponential, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowWPathValueFailureModuleRetry") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueFailureModuleRetry: + """ + Attributes: + constant (Union[Unset, OpenFlowWPathValueFailureModuleRetryConstant]): + exponential (Union[Unset, OpenFlowWPathValueFailureModuleRetryExponential]): + """ + + constant: Union[Unset, OpenFlowWPathValueFailureModuleRetryConstant] = UNSET + exponential: Union[Unset, OpenFlowWPathValueFailureModuleRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, OpenFlowWPathValueFailureModuleRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = OpenFlowWPathValueFailureModuleRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, OpenFlowWPathValueFailureModuleRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = OpenFlowWPathValueFailureModuleRetryExponential.from_dict(_exponential) + + open_flow_w_path_value_failure_module_retry = cls( + constant=constant, + exponential=exponential, + ) + + open_flow_w_path_value_failure_module_retry.additional_properties = d + return open_flow_w_path_value_failure_module_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_retry_constant.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_retry_constant.py new file mode 100644 index 0000000000..c2bd09e3a6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowWPathValueFailureModuleRetryConstant") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueFailureModuleRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + open_flow_w_path_value_failure_module_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + open_flow_w_path_value_failure_module_retry_constant.additional_properties = d + return open_flow_w_path_value_failure_module_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_retry_exponential.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_retry_exponential.py new file mode 100644 index 0000000000..11521b6110 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowWPathValueFailureModuleRetryExponential") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueFailureModuleRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + open_flow_w_path_value_failure_module_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + open_flow_w_path_value_failure_module_retry_exponential.additional_properties = d + return open_flow_w_path_value_failure_module_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_sleep_type_0.py new file mode 100644 index 0000000000..131cbbc22f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_sleep_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_w_path_value_failure_module_sleep_type_0_type import ( + OpenFlowWPathValueFailureModuleSleepType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowWPathValueFailureModuleSleepType0") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueFailureModuleSleepType0: + """ + Attributes: + type (OpenFlowWPathValueFailureModuleSleepType0Type): + value (Union[Unset, Any]): + """ + + type: OpenFlowWPathValueFailureModuleSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = OpenFlowWPathValueFailureModuleSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + open_flow_w_path_value_failure_module_sleep_type_0 = cls( + type=type, + value=value, + ) + + open_flow_w_path_value_failure_module_sleep_type_0.additional_properties = d + return open_flow_w_path_value_failure_module_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_sleep_type_0_type.py new file mode 100644 index 0000000000..282cb9ab6e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowWPathValueFailureModuleSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_sleep_type_1.py new file mode 100644 index 0000000000..93535ad5c2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_sleep_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.open_flow_w_path_value_failure_module_sleep_type_1_type import ( + OpenFlowWPathValueFailureModuleSleepType1Type, +) + +T = TypeVar("T", bound="OpenFlowWPathValueFailureModuleSleepType1") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueFailureModuleSleepType1: + """ + Attributes: + expr (str): + type (OpenFlowWPathValueFailureModuleSleepType1Type): + """ + + expr: str + type: OpenFlowWPathValueFailureModuleSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = OpenFlowWPathValueFailureModuleSleepType1Type(d.pop("type")) + + open_flow_w_path_value_failure_module_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + open_flow_w_path_value_failure_module_sleep_type_1.additional_properties = d + return open_flow_w_path_value_failure_module_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_sleep_type_1_type.py new file mode 100644 index 0000000000..3d8b5cce9a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowWPathValueFailureModuleSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_stop_after_if.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_stop_after_if.py new file mode 100644 index 0000000000..b4a8981576 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowWPathValueFailureModuleStopAfterIf") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueFailureModuleStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + open_flow_w_path_value_failure_module_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + open_flow_w_path_value_failure_module_stop_after_if.additional_properties = d + return open_flow_w_path_value_failure_module_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_0.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_0.py new file mode 100644 index 0000000000..f128e212d8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_w_path_value_failure_module_value_type_0_language import ( + OpenFlowWPathValueFailureModuleValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowWPathValueFailureModuleValueType0") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueFailureModuleValueType0: + """ + Attributes: + content (str): + language (OpenFlowWPathValueFailureModuleValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: OpenFlowWPathValueFailureModuleValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = OpenFlowWPathValueFailureModuleValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + open_flow_w_path_value_failure_module_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + open_flow_w_path_value_failure_module_value_type_0.additional_properties = d + return open_flow_w_path_value_failure_module_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_0_language.py new file mode 100644 index 0000000000..3d7c98b329 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class OpenFlowWPathValueFailureModuleValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_1.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_1.py new file mode 100644 index 0000000000..846ac5a26b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.open_flow_w_path_value_failure_module_value_type_1_type import ( + OpenFlowWPathValueFailureModuleValueType1Type, +) + +T = TypeVar("T", bound="OpenFlowWPathValueFailureModuleValueType1") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueFailureModuleValueType1: + """ + Attributes: + path (str): + type (OpenFlowWPathValueFailureModuleValueType1Type): + """ + + path: str + type: OpenFlowWPathValueFailureModuleValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = OpenFlowWPathValueFailureModuleValueType1Type(d.pop("type")) + + open_flow_w_path_value_failure_module_value_type_1 = cls( + path=path, + type=type, + ) + + open_flow_w_path_value_failure_module_value_type_1.additional_properties = d + return open_flow_w_path_value_failure_module_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_1_type.py new file mode 100644 index 0000000000..687120c983 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowWPathValueFailureModuleValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2.py new file mode 100644 index 0000000000..ae03f5b5e1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2.py @@ -0,0 +1,111 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_w_path_value_failure_module_value_type_2_iterator_type_0 import ( + OpenFlowWPathValueFailureModuleValueType2IteratorType0, +) +from ..models.open_flow_w_path_value_failure_module_value_type_2_iterator_type_1 import ( + OpenFlowWPathValueFailureModuleValueType2IteratorType1, +) +from ..models.open_flow_w_path_value_failure_module_value_type_2_type import ( + OpenFlowWPathValueFailureModuleValueType2Type, +) + +T = TypeVar("T", bound="OpenFlowWPathValueFailureModuleValueType2") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueFailureModuleValueType2: + """ + Attributes: + iterator (Union[OpenFlowWPathValueFailureModuleValueType2IteratorType0, + OpenFlowWPathValueFailureModuleValueType2IteratorType1]): + skip_failures (bool): + type (OpenFlowWPathValueFailureModuleValueType2Type): + """ + + iterator: Union[ + OpenFlowWPathValueFailureModuleValueType2IteratorType0, OpenFlowWPathValueFailureModuleValueType2IteratorType1 + ] + skip_failures: bool + type: OpenFlowWPathValueFailureModuleValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, OpenFlowWPathValueFailureModuleValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + OpenFlowWPathValueFailureModuleValueType2IteratorType0, + OpenFlowWPathValueFailureModuleValueType2IteratorType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = OpenFlowWPathValueFailureModuleValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = OpenFlowWPathValueFailureModuleValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = OpenFlowWPathValueFailureModuleValueType2Type(d.pop("type")) + + open_flow_w_path_value_failure_module_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + open_flow_w_path_value_failure_module_value_type_2.additional_properties = d + return open_flow_w_path_value_failure_module_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..bc9a9c27f1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_w_path_value_failure_module_value_type_2_iterator_type_0_type import ( + OpenFlowWPathValueFailureModuleValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowWPathValueFailureModuleValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueFailureModuleValueType2IteratorType0: + """ + Attributes: + type (OpenFlowWPathValueFailureModuleValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: OpenFlowWPathValueFailureModuleValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = OpenFlowWPathValueFailureModuleValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + open_flow_w_path_value_failure_module_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + open_flow_w_path_value_failure_module_value_type_2_iterator_type_0.additional_properties = d + return open_flow_w_path_value_failure_module_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..4ffd9bb34a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowWPathValueFailureModuleValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..ecde04d64a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.open_flow_w_path_value_failure_module_value_type_2_iterator_type_1_type import ( + OpenFlowWPathValueFailureModuleValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="OpenFlowWPathValueFailureModuleValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueFailureModuleValueType2IteratorType1: + """ + Attributes: + expr (str): + type (OpenFlowWPathValueFailureModuleValueType2IteratorType1Type): + """ + + expr: str + type: OpenFlowWPathValueFailureModuleValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = OpenFlowWPathValueFailureModuleValueType2IteratorType1Type(d.pop("type")) + + open_flow_w_path_value_failure_module_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + open_flow_w_path_value_failure_module_value_type_2_iterator_type_1.additional_properties = d + return open_flow_w_path_value_failure_module_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..9582f276a1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowWPathValueFailureModuleValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2_type.py new file mode 100644 index 0000000000..9c12474ba2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowWPathValueFailureModuleValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_3.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_3.py new file mode 100644 index 0000000000..1b5cc760f7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_3.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_w_path_value_failure_module_value_type_3_type import ( + OpenFlowWPathValueFailureModuleValueType3Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowWPathValueFailureModuleValueType3") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueFailureModuleValueType3: + """ + Attributes: + type (OpenFlowWPathValueFailureModuleValueType3Type): + path (Union[Unset, str]): + """ + + type: OpenFlowWPathValueFailureModuleValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = OpenFlowWPathValueFailureModuleValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + open_flow_w_path_value_failure_module_value_type_3 = cls( + type=type, + path=path, + ) + + open_flow_w_path_value_failure_module_value_type_3.additional_properties = d + return open_flow_w_path_value_failure_module_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_3_type.py new file mode 100644 index 0000000000..83a5f66026 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_failure_module_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowWPathValueFailureModuleValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item.py new file mode 100644 index 0000000000..ccb6d4d9cf --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item.py @@ -0,0 +1,228 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_w_path_value_modules_item_input_transforms import OpenFlowWPathValueModulesItemInputTransforms +from ..models.open_flow_w_path_value_modules_item_retry import OpenFlowWPathValueModulesItemRetry +from ..models.open_flow_w_path_value_modules_item_sleep_type_0 import OpenFlowWPathValueModulesItemSleepType0 +from ..models.open_flow_w_path_value_modules_item_sleep_type_1 import OpenFlowWPathValueModulesItemSleepType1 +from ..models.open_flow_w_path_value_modules_item_stop_after_if import OpenFlowWPathValueModulesItemStopAfterIf +from ..models.open_flow_w_path_value_modules_item_value_type_0 import OpenFlowWPathValueModulesItemValueType0 +from ..models.open_flow_w_path_value_modules_item_value_type_1 import OpenFlowWPathValueModulesItemValueType1 +from ..models.open_flow_w_path_value_modules_item_value_type_2 import OpenFlowWPathValueModulesItemValueType2 +from ..models.open_flow_w_path_value_modules_item_value_type_3 import OpenFlowWPathValueModulesItemValueType3 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowWPathValueModulesItem") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueModulesItem: + """ + Attributes: + input_transforms (OpenFlowWPathValueModulesItemInputTransforms): + value (Union[OpenFlowWPathValueModulesItemValueType0, OpenFlowWPathValueModulesItemValueType1, + OpenFlowWPathValueModulesItemValueType2, OpenFlowWPathValueModulesItemValueType3]): + stop_after_if (Union[Unset, OpenFlowWPathValueModulesItemStopAfterIf]): + sleep (Union[OpenFlowWPathValueModulesItemSleepType0, OpenFlowWPathValueModulesItemSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, OpenFlowWPathValueModulesItemRetry]): + """ + + input_transforms: OpenFlowWPathValueModulesItemInputTransforms + value: Union[ + OpenFlowWPathValueModulesItemValueType0, + OpenFlowWPathValueModulesItemValueType1, + OpenFlowWPathValueModulesItemValueType2, + OpenFlowWPathValueModulesItemValueType3, + ] + stop_after_if: Union[Unset, OpenFlowWPathValueModulesItemStopAfterIf] = UNSET + sleep: Union[OpenFlowWPathValueModulesItemSleepType0, OpenFlowWPathValueModulesItemSleepType1, Unset] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, OpenFlowWPathValueModulesItemRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, OpenFlowWPathValueModulesItemValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, OpenFlowWPathValueModulesItemValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, OpenFlowWPathValueModulesItemValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, OpenFlowWPathValueModulesItemSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = OpenFlowWPathValueModulesItemInputTransforms.from_dict(d.pop("input_transforms")) + + def _parse_value( + data: object, + ) -> Union[ + OpenFlowWPathValueModulesItemValueType0, + OpenFlowWPathValueModulesItemValueType1, + OpenFlowWPathValueModulesItemValueType2, + OpenFlowWPathValueModulesItemValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = OpenFlowWPathValueModulesItemValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = OpenFlowWPathValueModulesItemValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = OpenFlowWPathValueModulesItemValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = OpenFlowWPathValueModulesItemValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, OpenFlowWPathValueModulesItemStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = OpenFlowWPathValueModulesItemStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[OpenFlowWPathValueModulesItemSleepType0, OpenFlowWPathValueModulesItemSleepType1, Unset]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, OpenFlowWPathValueModulesItemSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = OpenFlowWPathValueModulesItemSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, OpenFlowWPathValueModulesItemSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = OpenFlowWPathValueModulesItemSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, OpenFlowWPathValueModulesItemRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = OpenFlowWPathValueModulesItemRetry.from_dict(_retry) + + open_flow_w_path_value_modules_item = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + open_flow_w_path_value_modules_item.additional_properties = d + return open_flow_w_path_value_modules_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_input_transforms.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_input_transforms.py new file mode 100644 index 0000000000..f4140cc0d4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_input_transforms.py @@ -0,0 +1,107 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_w_path_value_modules_item_input_transforms_additional_property_type_0 import ( + OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType0, +) +from ..models.open_flow_w_path_value_modules_item_input_transforms_additional_property_type_1 import ( + OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="OpenFlowWPathValueModulesItemInputTransforms") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueModulesItemInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType0, + OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + open_flow_w_path_value_modules_item_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType0, + OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType0.from_dict(data) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType1.from_dict(data) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + open_flow_w_path_value_modules_item_input_transforms.additional_properties = additional_properties + return open_flow_w_path_value_modules_item_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType0, + OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType0, + OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..657d60a142 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_input_transforms_additional_property_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_w_path_value_modules_item_input_transforms_additional_property_type_0_type import ( + OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + open_flow_w_path_value_modules_item_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + open_flow_w_path_value_modules_item_input_transforms_additional_property_type_0.additional_properties = d + return open_flow_w_path_value_modules_item_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..03a2971caf --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..7cc53c4296 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_input_transforms_additional_property_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.open_flow_w_path_value_modules_item_input_transforms_additional_property_type_1_type import ( + OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + open_flow_w_path_value_modules_item_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + open_flow_w_path_value_modules_item_input_transforms_additional_property_type_1.additional_properties = d + return open_flow_w_path_value_modules_item_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..199ee34886 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowWPathValueModulesItemInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_retry.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_retry.py new file mode 100644 index 0000000000..8694073e71 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_retry.py @@ -0,0 +1,82 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_w_path_value_modules_item_retry_constant import OpenFlowWPathValueModulesItemRetryConstant +from ..models.open_flow_w_path_value_modules_item_retry_exponential import OpenFlowWPathValueModulesItemRetryExponential +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowWPathValueModulesItemRetry") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueModulesItemRetry: + """ + Attributes: + constant (Union[Unset, OpenFlowWPathValueModulesItemRetryConstant]): + exponential (Union[Unset, OpenFlowWPathValueModulesItemRetryExponential]): + """ + + constant: Union[Unset, OpenFlowWPathValueModulesItemRetryConstant] = UNSET + exponential: Union[Unset, OpenFlowWPathValueModulesItemRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, OpenFlowWPathValueModulesItemRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = OpenFlowWPathValueModulesItemRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, OpenFlowWPathValueModulesItemRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = OpenFlowWPathValueModulesItemRetryExponential.from_dict(_exponential) + + open_flow_w_path_value_modules_item_retry = cls( + constant=constant, + exponential=exponential, + ) + + open_flow_w_path_value_modules_item_retry.additional_properties = d + return open_flow_w_path_value_modules_item_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_retry_constant.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_retry_constant.py new file mode 100644 index 0000000000..752886d272 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowWPathValueModulesItemRetryConstant") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueModulesItemRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + open_flow_w_path_value_modules_item_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + open_flow_w_path_value_modules_item_retry_constant.additional_properties = d + return open_flow_w_path_value_modules_item_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_retry_exponential.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_retry_exponential.py new file mode 100644 index 0000000000..8122ace3f3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowWPathValueModulesItemRetryExponential") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueModulesItemRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + open_flow_w_path_value_modules_item_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + open_flow_w_path_value_modules_item_retry_exponential.additional_properties = d + return open_flow_w_path_value_modules_item_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_sleep_type_0.py new file mode 100644 index 0000000000..c11e34d5e9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_sleep_type_0.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_w_path_value_modules_item_sleep_type_0_type import OpenFlowWPathValueModulesItemSleepType0Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowWPathValueModulesItemSleepType0") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueModulesItemSleepType0: + """ + Attributes: + type (OpenFlowWPathValueModulesItemSleepType0Type): + value (Union[Unset, Any]): + """ + + type: OpenFlowWPathValueModulesItemSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = OpenFlowWPathValueModulesItemSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + open_flow_w_path_value_modules_item_sleep_type_0 = cls( + type=type, + value=value, + ) + + open_flow_w_path_value_modules_item_sleep_type_0.additional_properties = d + return open_flow_w_path_value_modules_item_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_sleep_type_0_type.py new file mode 100644 index 0000000000..35502bb4a3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowWPathValueModulesItemSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_sleep_type_1.py new file mode 100644 index 0000000000..616a8b4abc --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_sleep_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.open_flow_w_path_value_modules_item_sleep_type_1_type import OpenFlowWPathValueModulesItemSleepType1Type + +T = TypeVar("T", bound="OpenFlowWPathValueModulesItemSleepType1") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueModulesItemSleepType1: + """ + Attributes: + expr (str): + type (OpenFlowWPathValueModulesItemSleepType1Type): + """ + + expr: str + type: OpenFlowWPathValueModulesItemSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = OpenFlowWPathValueModulesItemSleepType1Type(d.pop("type")) + + open_flow_w_path_value_modules_item_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + open_flow_w_path_value_modules_item_sleep_type_1.additional_properties = d + return open_flow_w_path_value_modules_item_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_sleep_type_1_type.py new file mode 100644 index 0000000000..93b2da487c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowWPathValueModulesItemSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_stop_after_if.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_stop_after_if.py new file mode 100644 index 0000000000..9c623e102d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowWPathValueModulesItemStopAfterIf") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueModulesItemStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + open_flow_w_path_value_modules_item_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + open_flow_w_path_value_modules_item_stop_after_if.additional_properties = d + return open_flow_w_path_value_modules_item_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_0.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_0.py new file mode 100644 index 0000000000..2e9ac86d15 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_w_path_value_modules_item_value_type_0_language import ( + OpenFlowWPathValueModulesItemValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowWPathValueModulesItemValueType0") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueModulesItemValueType0: + """ + Attributes: + content (str): + language (OpenFlowWPathValueModulesItemValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: OpenFlowWPathValueModulesItemValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = OpenFlowWPathValueModulesItemValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + open_flow_w_path_value_modules_item_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + open_flow_w_path_value_modules_item_value_type_0.additional_properties = d + return open_flow_w_path_value_modules_item_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_0_language.py new file mode 100644 index 0000000000..783adf4601 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class OpenFlowWPathValueModulesItemValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_1.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_1.py new file mode 100644 index 0000000000..ac8938d252 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.open_flow_w_path_value_modules_item_value_type_1_type import OpenFlowWPathValueModulesItemValueType1Type + +T = TypeVar("T", bound="OpenFlowWPathValueModulesItemValueType1") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueModulesItemValueType1: + """ + Attributes: + path (str): + type (OpenFlowWPathValueModulesItemValueType1Type): + """ + + path: str + type: OpenFlowWPathValueModulesItemValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = OpenFlowWPathValueModulesItemValueType1Type(d.pop("type")) + + open_flow_w_path_value_modules_item_value_type_1 = cls( + path=path, + type=type, + ) + + open_flow_w_path_value_modules_item_value_type_1.additional_properties = d + return open_flow_w_path_value_modules_item_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_1_type.py new file mode 100644 index 0000000000..36e474201b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowWPathValueModulesItemValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2.py new file mode 100644 index 0000000000..33ec1d2a9e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2.py @@ -0,0 +1,108 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_w_path_value_modules_item_value_type_2_iterator_type_0 import ( + OpenFlowWPathValueModulesItemValueType2IteratorType0, +) +from ..models.open_flow_w_path_value_modules_item_value_type_2_iterator_type_1 import ( + OpenFlowWPathValueModulesItemValueType2IteratorType1, +) +from ..models.open_flow_w_path_value_modules_item_value_type_2_type import OpenFlowWPathValueModulesItemValueType2Type + +T = TypeVar("T", bound="OpenFlowWPathValueModulesItemValueType2") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueModulesItemValueType2: + """ + Attributes: + iterator (Union[OpenFlowWPathValueModulesItemValueType2IteratorType0, + OpenFlowWPathValueModulesItemValueType2IteratorType1]): + skip_failures (bool): + type (OpenFlowWPathValueModulesItemValueType2Type): + """ + + iterator: Union[ + OpenFlowWPathValueModulesItemValueType2IteratorType0, OpenFlowWPathValueModulesItemValueType2IteratorType1 + ] + skip_failures: bool + type: OpenFlowWPathValueModulesItemValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, OpenFlowWPathValueModulesItemValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + OpenFlowWPathValueModulesItemValueType2IteratorType0, OpenFlowWPathValueModulesItemValueType2IteratorType1 + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = OpenFlowWPathValueModulesItemValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = OpenFlowWPathValueModulesItemValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = OpenFlowWPathValueModulesItemValueType2Type(d.pop("type")) + + open_flow_w_path_value_modules_item_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + open_flow_w_path_value_modules_item_value_type_2.additional_properties = d + return open_flow_w_path_value_modules_item_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..4ff5eb03e0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_w_path_value_modules_item_value_type_2_iterator_type_0_type import ( + OpenFlowWPathValueModulesItemValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowWPathValueModulesItemValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueModulesItemValueType2IteratorType0: + """ + Attributes: + type (OpenFlowWPathValueModulesItemValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: OpenFlowWPathValueModulesItemValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = OpenFlowWPathValueModulesItemValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + open_flow_w_path_value_modules_item_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + open_flow_w_path_value_modules_item_value_type_2_iterator_type_0.additional_properties = d + return open_flow_w_path_value_modules_item_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..c83a960c23 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowWPathValueModulesItemValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..00a31c2113 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.open_flow_w_path_value_modules_item_value_type_2_iterator_type_1_type import ( + OpenFlowWPathValueModulesItemValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="OpenFlowWPathValueModulesItemValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueModulesItemValueType2IteratorType1: + """ + Attributes: + expr (str): + type (OpenFlowWPathValueModulesItemValueType2IteratorType1Type): + """ + + expr: str + type: OpenFlowWPathValueModulesItemValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = OpenFlowWPathValueModulesItemValueType2IteratorType1Type(d.pop("type")) + + open_flow_w_path_value_modules_item_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + open_flow_w_path_value_modules_item_value_type_2_iterator_type_1.additional_properties = d + return open_flow_w_path_value_modules_item_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..3760abf57e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowWPathValueModulesItemValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2_type.py new file mode 100644 index 0000000000..bf8d2c9a68 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowWPathValueModulesItemValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_3.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_3.py new file mode 100644 index 0000000000..41acb5612a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_3.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.open_flow_w_path_value_modules_item_value_type_3_type import OpenFlowWPathValueModulesItemValueType3Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OpenFlowWPathValueModulesItemValueType3") + + +@attr.s(auto_attribs=True) +class OpenFlowWPathValueModulesItemValueType3: + """ + Attributes: + type (OpenFlowWPathValueModulesItemValueType3Type): + path (Union[Unset, str]): + """ + + type: OpenFlowWPathValueModulesItemValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = OpenFlowWPathValueModulesItemValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + open_flow_w_path_value_modules_item_value_type_3 = cls( + type=type, + path=path, + ) + + open_flow_w_path_value_modules_item_value_type_3.additional_properties = d + return open_flow_w_path_value_modules_item_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_3_type.py new file mode 100644 index 0000000000..25d45b614f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/open_flow_w_path_value_modules_item_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OpenFlowWPathValueModulesItemValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/path_flow.py b/python-client/windmill-api/windmill_api/models/path_flow.py new file mode 100644 index 0000000000..9993868619 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/path_flow.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.path_flow_type import PathFlowType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PathFlow") + + +@attr.s(auto_attribs=True) +class PathFlow: + """ + Attributes: + type (PathFlowType): + path (Union[Unset, str]): + """ + + type: PathFlowType + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = PathFlowType(d.pop("type")) + + path = d.pop("path", UNSET) + + path_flow = cls( + type=type, + path=path, + ) + + path_flow.additional_properties = d + return path_flow + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/path_flow_type.py b/python-client/windmill-api/windmill_api/models/path_flow_type.py new file mode 100644 index 0000000000..cadce833c3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/path_flow_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class PathFlowType(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/path_script.py b/python-client/windmill-api/windmill_api/models/path_script.py new file mode 100644 index 0000000000..210b6b7fe9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/path_script.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.path_script_type import PathScriptType + +T = TypeVar("T", bound="PathScript") + + +@attr.s(auto_attribs=True) +class PathScript: + """ + Attributes: + path (str): + type (PathScriptType): + """ + + path: str + type: PathScriptType + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = PathScriptType(d.pop("type")) + + path_script = cls( + path=path, + type=type, + ) + + path_script.additional_properties = d + return path_script + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/path_script_type.py b/python-client/windmill-api/windmill_api/models/path_script_type.py new file mode 100644 index 0000000000..2d37305a1e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/path_script_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class PathScriptType(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/preview.py b/python-client/windmill-api/windmill_api/models/preview.py new file mode 100644 index 0000000000..dedb4dedc2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/preview.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.preview_args import PreviewArgs +from ..models.preview_language import PreviewLanguage +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Preview") + + +@attr.s(auto_attribs=True) +class Preview: + """ + Attributes: + content (str): + args (PreviewArgs): + language (PreviewLanguage): + path (Union[Unset, str]): + """ + + content: str + args: PreviewArgs + language: PreviewLanguage + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + args = self.args.to_dict() + + language = self.language.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "args": args, + "language": language, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + args = PreviewArgs.from_dict(d.pop("args")) + + language = PreviewLanguage(d.pop("language")) + + path = d.pop("path", UNSET) + + preview = cls( + content=content, + args=args, + language=language, + path=path, + ) + + preview.additional_properties = d + return preview + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/preview_args.py b/python-client/windmill-api/windmill_api/models/preview_args.py new file mode 100644 index 0000000000..ee9231a882 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/preview_args.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="PreviewArgs") + + +@attr.s(auto_attribs=True) +class PreviewArgs: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + preview_args = cls() + + preview_args.additional_properties = d + return preview_args + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/preview_language.py b/python-client/windmill-api/windmill_api/models/preview_language.py new file mode 100644 index 0000000000..ddd1704322 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/preview_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class PreviewLanguage(str, Enum): + PYTHON3 = "python3" + DENO = "deno" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/preview_schedule_json_body.py b/python-client/windmill-api/windmill_api/models/preview_schedule_json_body.py new file mode 100644 index 0000000000..f0077a8947 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/preview_schedule_json_body.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PreviewScheduleJsonBody") + + +@attr.s(auto_attribs=True) +class PreviewScheduleJsonBody: + """ + Attributes: + schedule (str): + offset (Union[Unset, int]): + """ + + schedule: str + offset: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + schedule = self.schedule + offset = self.offset + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "schedule": schedule, + } + ) + if offset is not UNSET: + field_dict["offset"] = offset + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + schedule = d.pop("schedule") + + offset = d.pop("offset", UNSET) + + preview_schedule_json_body = cls( + schedule=schedule, + offset=offset, + ) + + preview_schedule_json_body.additional_properties = d + return preview_schedule_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200.py b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200.py new file mode 100644 index 0000000000..073db59fea --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.python_to_jsonschema_response_200_args_item import PythonToJsonschemaResponse200ArgsItem +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PythonToJsonschemaResponse200") + + +@attr.s(auto_attribs=True) +class PythonToJsonschemaResponse200: + """ + Attributes: + star_args (bool): + args (List[PythonToJsonschemaResponse200ArgsItem]): + star_kwargs (Union[Unset, bool]): + """ + + star_args: bool + args: List[PythonToJsonschemaResponse200ArgsItem] + star_kwargs: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + star_args = self.star_args + args = [] + for args_item_data in self.args: + args_item = args_item_data.to_dict() + + args.append(args_item) + + star_kwargs = self.star_kwargs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "star_args": star_args, + "args": args, + } + ) + if star_kwargs is not UNSET: + field_dict["star_kwargs"] = star_kwargs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + star_args = d.pop("star_args") + + args = [] + _args = d.pop("args") + for args_item_data in _args: + args_item = PythonToJsonschemaResponse200ArgsItem.from_dict(args_item_data) + + args.append(args_item) + + star_kwargs = d.pop("star_kwargs", UNSET) + + python_to_jsonschema_response_200 = cls( + star_args=star_args, + args=args, + star_kwargs=star_kwargs, + ) + + python_to_jsonschema_response_200.additional_properties = d + return python_to_jsonschema_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item.py b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item.py new file mode 100644 index 0000000000..d1612d2abd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item.py @@ -0,0 +1,167 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.python_to_jsonschema_response_200_args_item_typ_type_0 import ( + PythonToJsonschemaResponse200ArgsItemTypType0, +) +from ..models.python_to_jsonschema_response_200_args_item_typ_type_1 import ( + PythonToJsonschemaResponse200ArgsItemTypType1, +) +from ..models.python_to_jsonschema_response_200_args_item_typ_type_2 import ( + PythonToJsonschemaResponse200ArgsItemTypType2, +) +from ..models.python_to_jsonschema_response_200_args_item_typ_type_3 import ( + PythonToJsonschemaResponse200ArgsItemTypType3, +) +from ..models.python_to_jsonschema_response_200_args_item_typ_type_4 import ( + PythonToJsonschemaResponse200ArgsItemTypType4, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PythonToJsonschemaResponse200ArgsItem") + + +@attr.s(auto_attribs=True) +class PythonToJsonschemaResponse200ArgsItem: + """ + Attributes: + name (str): + typ (Union[PythonToJsonschemaResponse200ArgsItemTypType0, PythonToJsonschemaResponse200ArgsItemTypType1, + PythonToJsonschemaResponse200ArgsItemTypType2, PythonToJsonschemaResponse200ArgsItemTypType3, + PythonToJsonschemaResponse200ArgsItemTypType4]): + has_default (Union[Unset, bool]): + default (Union[Unset, Any]): + """ + + name: str + typ: Union[ + PythonToJsonschemaResponse200ArgsItemTypType0, + PythonToJsonschemaResponse200ArgsItemTypType1, + PythonToJsonschemaResponse200ArgsItemTypType2, + PythonToJsonschemaResponse200ArgsItemTypType3, + PythonToJsonschemaResponse200ArgsItemTypType4, + ] + has_default: Union[Unset, bool] = UNSET + default: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + + if isinstance(self.typ, PythonToJsonschemaResponse200ArgsItemTypType0): + typ = self.typ.value + + elif isinstance(self.typ, PythonToJsonschemaResponse200ArgsItemTypType1): + typ = self.typ.to_dict() + + elif isinstance(self.typ, PythonToJsonschemaResponse200ArgsItemTypType2): + typ = self.typ.to_dict() + + elif isinstance(self.typ, PythonToJsonschemaResponse200ArgsItemTypType3): + typ = self.typ.to_dict() + + else: + typ = self.typ.to_dict() + + has_default = self.has_default + default = self.default + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "typ": typ, + } + ) + if has_default is not UNSET: + field_dict["has_default"] = has_default + if default is not UNSET: + field_dict["default"] = default + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name") + + def _parse_typ( + data: object, + ) -> Union[ + PythonToJsonschemaResponse200ArgsItemTypType0, + PythonToJsonschemaResponse200ArgsItemTypType1, + PythonToJsonschemaResponse200ArgsItemTypType2, + PythonToJsonschemaResponse200ArgsItemTypType3, + PythonToJsonschemaResponse200ArgsItemTypType4, + ]: + try: + if not isinstance(data, str): + raise TypeError() + typ_type_0 = PythonToJsonschemaResponse200ArgsItemTypType0(data) + + return typ_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + typ_type_1 = PythonToJsonschemaResponse200ArgsItemTypType1.from_dict(data) + + return typ_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + typ_type_2 = PythonToJsonschemaResponse200ArgsItemTypType2.from_dict(data) + + return typ_type_2 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + typ_type_3 = PythonToJsonschemaResponse200ArgsItemTypType3.from_dict(data) + + return typ_type_3 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + typ_type_4 = PythonToJsonschemaResponse200ArgsItemTypType4.from_dict(data) + + return typ_type_4 + + typ = _parse_typ(d.pop("typ")) + + has_default = d.pop("has_default", UNSET) + + default = d.pop("default", UNSET) + + python_to_jsonschema_response_200_args_item = cls( + name=name, + typ=typ, + has_default=has_default, + default=default, + ) + + python_to_jsonschema_response_200_args_item.additional_properties = d + return python_to_jsonschema_response_200_args_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_0.py b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_0.py new file mode 100644 index 0000000000..81ae472bf7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_0.py @@ -0,0 +1,16 @@ +from enum import Enum + + +class PythonToJsonschemaResponse200ArgsItemTypType0(str, Enum): + FLOAT = "float" + INT = "int" + BOOL = "bool" + EMAIL = "email" + UNKNOWN = "unknown" + BYTES = "bytes" + DICT = "dict" + DATETIME = "datetime" + SQL = "sql" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_1.py b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_1.py new file mode 100644 index 0000000000..57a169d95a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_1.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Optional, Type, TypeVar + +import attr + +T = TypeVar("T", bound="PythonToJsonschemaResponse200ArgsItemTypType1") + + +@attr.s(auto_attribs=True) +class PythonToJsonschemaResponse200ArgsItemTypType1: + """ + Attributes: + resource (Optional[str]): + """ + + resource: Optional[str] + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + resource = self.resource + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "resource": resource, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + resource = d.pop("resource") + + python_to_jsonschema_response_200_args_item_typ_type_1 = cls( + resource=resource, + ) + + python_to_jsonschema_response_200_args_item_typ_type_1.additional_properties = d + return python_to_jsonschema_response_200_args_item_typ_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_2.py b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_2.py new file mode 100644 index 0000000000..0054e655b5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_2.py @@ -0,0 +1,60 @@ +from typing import Any, Dict, List, Optional, Type, TypeVar, cast + +import attr + +T = TypeVar("T", bound="PythonToJsonschemaResponse200ArgsItemTypType2") + + +@attr.s(auto_attribs=True) +class PythonToJsonschemaResponse200ArgsItemTypType2: + """ + Attributes: + str_ (Optional[List[str]]): + """ + + str_: Optional[List[str]] + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if self.str_ is None: + str_ = None + else: + str_ = self.str_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "str": str_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + str_ = cast(List[str], d.pop("str")) + + python_to_jsonschema_response_200_args_item_typ_type_2 = cls( + str_=str_, + ) + + python_to_jsonschema_response_200_args_item_typ_type_2.additional_properties = d + return python_to_jsonschema_response_200_args_item_typ_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_3.py b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_3.py new file mode 100644 index 0000000000..1256fa819a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_3.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.python_to_jsonschema_response_200_args_item_typ_type_3_object_item import ( + PythonToJsonschemaResponse200ArgsItemTypType3ObjectItem, +) + +T = TypeVar("T", bound="PythonToJsonschemaResponse200ArgsItemTypType3") + + +@attr.s(auto_attribs=True) +class PythonToJsonschemaResponse200ArgsItemTypType3: + """ + Attributes: + object_ (List[PythonToJsonschemaResponse200ArgsItemTypType3ObjectItem]): + """ + + object_: List[PythonToJsonschemaResponse200ArgsItemTypType3ObjectItem] + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + object_ = [] + for object_item_data in self.object_: + object_item = object_item_data.to_dict() + + object_.append(object_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "object": object_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + object_ = [] + _object_ = d.pop("object") + for object_item_data in _object_: + object_item = PythonToJsonschemaResponse200ArgsItemTypType3ObjectItem.from_dict(object_item_data) + + object_.append(object_item) + + python_to_jsonschema_response_200_args_item_typ_type_3 = cls( + object_=object_, + ) + + python_to_jsonschema_response_200_args_item_typ_type_3.additional_properties = d + return python_to_jsonschema_response_200_args_item_typ_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_3_object_item.py b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_3_object_item.py new file mode 100644 index 0000000000..7071644ea7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_3_object_item.py @@ -0,0 +1,100 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.python_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_0 import ( + PythonToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0, +) +from ..models.python_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1 import ( + PythonToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1, +) + +T = TypeVar("T", bound="PythonToJsonschemaResponse200ArgsItemTypType3ObjectItem") + + +@attr.s(auto_attribs=True) +class PythonToJsonschemaResponse200ArgsItemTypType3ObjectItem: + """ + Attributes: + key (str): + typ (Union[PythonToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0, + PythonToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1]): + """ + + key: str + typ: Union[ + PythonToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0, + PythonToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1, + ] + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + key = self.key + + if isinstance(self.typ, PythonToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0): + typ = self.typ.value + + else: + typ = self.typ.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "key": key, + "typ": typ, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + key = d.pop("key") + + def _parse_typ( + data: object, + ) -> Union[ + PythonToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0, + PythonToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1, + ]: + try: + if not isinstance(data, str): + raise TypeError() + typ_type_0 = PythonToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0(data) + + return typ_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + typ_type_1 = PythonToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1.from_dict(data) + + return typ_type_1 + + typ = _parse_typ(d.pop("typ")) + + python_to_jsonschema_response_200_args_item_typ_type_3_object_item = cls( + key=key, + typ=typ, + ) + + python_to_jsonschema_response_200_args_item_typ_type_3_object_item.additional_properties = d + return python_to_jsonschema_response_200_args_item_typ_type_3_object_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_0.py b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_0.py new file mode 100644 index 0000000000..9fe338781d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_0.py @@ -0,0 +1,16 @@ +from enum import Enum + + +class PythonToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType0(str, Enum): + FLOAT = "float" + INT = "int" + BOOL = "bool" + EMAIL = "email" + UNKNOWN = "unknown" + BYTES = "bytes" + DICT = "dict" + DATETIME = "datetime" + SQL = "sql" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1.py b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1.py new file mode 100644 index 0000000000..436de3bede --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="PythonToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1") + + +@attr.s(auto_attribs=True) +class PythonToJsonschemaResponse200ArgsItemTypType3ObjectItemTypType1: + """ + Attributes: + str_ (Any): + """ + + str_: Any + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + str_ = self.str_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "str": str_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + str_ = d.pop("str") + + python_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1 = cls( + str_=str_, + ) + + python_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1.additional_properties = d + return python_to_jsonschema_response_200_args_item_typ_type_3_object_item_typ_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_4.py b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_4.py new file mode 100644 index 0000000000..dc6bbbbfa7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_4.py @@ -0,0 +1,101 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.python_to_jsonschema_response_200_args_item_typ_type_4_list_type_0 import ( + PythonToJsonschemaResponse200ArgsItemTypType4ListType0, +) +from ..models.python_to_jsonschema_response_200_args_item_typ_type_4_list_type_1 import ( + PythonToJsonschemaResponse200ArgsItemTypType4ListType1, +) + +T = TypeVar("T", bound="PythonToJsonschemaResponse200ArgsItemTypType4") + + +@attr.s(auto_attribs=True) +class PythonToJsonschemaResponse200ArgsItemTypType4: + """ + Attributes: + list_ (Union[None, PythonToJsonschemaResponse200ArgsItemTypType4ListType0, + PythonToJsonschemaResponse200ArgsItemTypType4ListType1]): + """ + + list_: Union[ + None, + PythonToJsonschemaResponse200ArgsItemTypType4ListType0, + PythonToJsonschemaResponse200ArgsItemTypType4ListType1, + ] + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + list_: Union[Dict[str, Any], None, str] + if self.list_ is None: + list_ = None + + elif isinstance(self.list_, PythonToJsonschemaResponse200ArgsItemTypType4ListType0): + list_ = self.list_.value + + else: + list_ = self.list_.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "list": list_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_list_( + data: object, + ) -> Union[ + None, + PythonToJsonschemaResponse200ArgsItemTypType4ListType0, + PythonToJsonschemaResponse200ArgsItemTypType4ListType1, + ]: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + list_type_0 = PythonToJsonschemaResponse200ArgsItemTypType4ListType0(data) + + return list_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + list_type_1 = PythonToJsonschemaResponse200ArgsItemTypType4ListType1.from_dict(data) + + return list_type_1 + + list_ = _parse_list_(d.pop("list")) + + python_to_jsonschema_response_200_args_item_typ_type_4 = cls( + list_=list_, + ) + + python_to_jsonschema_response_200_args_item_typ_type_4.additional_properties = d + return python_to_jsonschema_response_200_args_item_typ_type_4 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_4_list_type_0.py b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_4_list_type_0.py new file mode 100644 index 0000000000..22b83586d8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_4_list_type_0.py @@ -0,0 +1,16 @@ +from enum import Enum + + +class PythonToJsonschemaResponse200ArgsItemTypType4ListType0(str, Enum): + FLOAT = "float" + INT = "int" + BOOL = "bool" + EMAIL = "email" + UNKNOWN = "unknown" + BYTES = "bytes" + DICT = "dict" + DATETIME = "datetime" + SQL = "sql" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_4_list_type_1.py b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_4_list_type_1.py new file mode 100644 index 0000000000..174d848ac5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/python_to_jsonschema_response_200_args_item_typ_type_4_list_type_1.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="PythonToJsonschemaResponse200ArgsItemTypType4ListType1") + + +@attr.s(auto_attribs=True) +class PythonToJsonschemaResponse200ArgsItemTypType4ListType1: + """ + Attributes: + str_ (Any): + """ + + str_: Any + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + str_ = self.str_ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "str": str_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + str_ = d.pop("str") + + python_to_jsonschema_response_200_args_item_typ_type_4_list_type_1 = cls( + str_=str_, + ) + + python_to_jsonschema_response_200_args_item_typ_type_4_list_type_1.additional_properties = d + return python_to_jsonschema_response_200_args_item_typ_type_4_list_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job.py b/python-client/windmill-api/windmill_api/models/queued_job.py new file mode 100644 index 0000000000..44196273c1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job.py @@ -0,0 +1,310 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.queued_job_args import QueuedJobArgs +from ..models.queued_job_flow_status import QueuedJobFlowStatus +from ..models.queued_job_job_kind import QueuedJobJobKind +from ..models.queued_job_language import QueuedJobLanguage +from ..models.queued_job_raw_flow import QueuedJobRawFlow +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJob") + + +@attr.s(auto_attribs=True) +class QueuedJob: + """ + Attributes: + id (str): + running (bool): + canceled (bool): + job_kind (QueuedJobJobKind): + permissioned_as (str): The user (u/userfoo) or group (g/groupfoo) whom + the execution of this script will be permissioned_as and by extension its DT_TOKEN. + is_flow_step (bool): + workspace_id (Union[Unset, str]): + parent_job (Union[Unset, str]): + created_by (Union[Unset, str]): + created_at (Union[Unset, datetime.datetime]): + started_at (Union[Unset, datetime.datetime]): + scheduled_for (Union[Unset, datetime.datetime]): + script_path (Union[Unset, str]): + script_hash (Union[Unset, str]): + args (Union[Unset, QueuedJobArgs]): + logs (Union[Unset, str]): + raw_code (Union[Unset, str]): + canceled_by (Union[Unset, str]): + canceled_reason (Union[Unset, str]): + last_ping (Union[Unset, datetime.datetime]): + schedule_path (Union[Unset, str]): + flow_status (Union[Unset, QueuedJobFlowStatus]): + raw_flow (Union[Unset, QueuedJobRawFlow]): + language (Union[Unset, QueuedJobLanguage]): + """ + + id: str + running: bool + canceled: bool + job_kind: QueuedJobJobKind + permissioned_as: str + is_flow_step: bool + workspace_id: Union[Unset, str] = UNSET + parent_job: Union[Unset, str] = UNSET + created_by: Union[Unset, str] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + scheduled_for: Union[Unset, datetime.datetime] = UNSET + script_path: Union[Unset, str] = UNSET + script_hash: Union[Unset, str] = UNSET + args: Union[Unset, QueuedJobArgs] = UNSET + logs: Union[Unset, str] = UNSET + raw_code: Union[Unset, str] = UNSET + canceled_by: Union[Unset, str] = UNSET + canceled_reason: Union[Unset, str] = UNSET + last_ping: Union[Unset, datetime.datetime] = UNSET + schedule_path: Union[Unset, str] = UNSET + flow_status: Union[Unset, QueuedJobFlowStatus] = UNSET + raw_flow: Union[Unset, QueuedJobRawFlow] = UNSET + language: Union[Unset, QueuedJobLanguage] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + running = self.running + canceled = self.canceled + job_kind = self.job_kind.value + + permissioned_as = self.permissioned_as + is_flow_step = self.is_flow_step + workspace_id = self.workspace_id + parent_job = self.parent_job + created_by = self.created_by + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + + scheduled_for: Union[Unset, str] = UNSET + if not isinstance(self.scheduled_for, Unset): + scheduled_for = self.scheduled_for.isoformat() + + script_path = self.script_path + script_hash = self.script_hash + args: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.args, Unset): + args = self.args.to_dict() + + logs = self.logs + raw_code = self.raw_code + canceled_by = self.canceled_by + canceled_reason = self.canceled_reason + last_ping: Union[Unset, str] = UNSET + if not isinstance(self.last_ping, Unset): + last_ping = self.last_ping.isoformat() + + schedule_path = self.schedule_path + flow_status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.flow_status, Unset): + flow_status = self.flow_status.to_dict() + + raw_flow: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.raw_flow, Unset): + raw_flow = self.raw_flow.to_dict() + + language: Union[Unset, str] = UNSET + if not isinstance(self.language, Unset): + language = self.language.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "running": running, + "canceled": canceled, + "job_kind": job_kind, + "permissioned_as": permissioned_as, + "is_flow_step": is_flow_step, + } + ) + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if parent_job is not UNSET: + field_dict["parent_job"] = parent_job + if created_by is not UNSET: + field_dict["created_by"] = created_by + if created_at is not UNSET: + field_dict["created_at"] = created_at + if started_at is not UNSET: + field_dict["started_at"] = started_at + if scheduled_for is not UNSET: + field_dict["scheduled_for"] = scheduled_for + if script_path is not UNSET: + field_dict["script_path"] = script_path + if script_hash is not UNSET: + field_dict["script_hash"] = script_hash + if args is not UNSET: + field_dict["args"] = args + if logs is not UNSET: + field_dict["logs"] = logs + if raw_code is not UNSET: + field_dict["raw_code"] = raw_code + if canceled_by is not UNSET: + field_dict["canceled_by"] = canceled_by + if canceled_reason is not UNSET: + field_dict["canceled_reason"] = canceled_reason + if last_ping is not UNSET: + field_dict["last_ping"] = last_ping + if schedule_path is not UNSET: + field_dict["schedule_path"] = schedule_path + if flow_status is not UNSET: + field_dict["flow_status"] = flow_status + if raw_flow is not UNSET: + field_dict["raw_flow"] = raw_flow + if language is not UNSET: + field_dict["language"] = language + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id") + + running = d.pop("running") + + canceled = d.pop("canceled") + + job_kind = QueuedJobJobKind(d.pop("job_kind")) + + permissioned_as = d.pop("permissioned_as") + + is_flow_step = d.pop("is_flow_step") + + workspace_id = d.pop("workspace_id", UNSET) + + parent_job = d.pop("parent_job", UNSET) + + created_by = d.pop("created_by", UNSET) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _scheduled_for = d.pop("scheduled_for", UNSET) + scheduled_for: Union[Unset, datetime.datetime] + if isinstance(_scheduled_for, Unset): + scheduled_for = UNSET + else: + scheduled_for = isoparse(_scheduled_for) + + script_path = d.pop("script_path", UNSET) + + script_hash = d.pop("script_hash", UNSET) + + _args = d.pop("args", UNSET) + args: Union[Unset, QueuedJobArgs] + if isinstance(_args, Unset): + args = UNSET + else: + args = QueuedJobArgs.from_dict(_args) + + logs = d.pop("logs", UNSET) + + raw_code = d.pop("raw_code", UNSET) + + canceled_by = d.pop("canceled_by", UNSET) + + canceled_reason = d.pop("canceled_reason", UNSET) + + _last_ping = d.pop("last_ping", UNSET) + last_ping: Union[Unset, datetime.datetime] + if isinstance(_last_ping, Unset): + last_ping = UNSET + else: + last_ping = isoparse(_last_ping) + + schedule_path = d.pop("schedule_path", UNSET) + + _flow_status = d.pop("flow_status", UNSET) + flow_status: Union[Unset, QueuedJobFlowStatus] + if isinstance(_flow_status, Unset): + flow_status = UNSET + else: + flow_status = QueuedJobFlowStatus.from_dict(_flow_status) + + _raw_flow = d.pop("raw_flow", UNSET) + raw_flow: Union[Unset, QueuedJobRawFlow] + if isinstance(_raw_flow, Unset): + raw_flow = UNSET + else: + raw_flow = QueuedJobRawFlow.from_dict(_raw_flow) + + _language = d.pop("language", UNSET) + language: Union[Unset, QueuedJobLanguage] + if isinstance(_language, Unset): + language = UNSET + else: + language = QueuedJobLanguage(_language) + + queued_job = cls( + id=id, + running=running, + canceled=canceled, + job_kind=job_kind, + permissioned_as=permissioned_as, + is_flow_step=is_flow_step, + workspace_id=workspace_id, + parent_job=parent_job, + created_by=created_by, + created_at=created_at, + started_at=started_at, + scheduled_for=scheduled_for, + script_path=script_path, + script_hash=script_hash, + args=args, + logs=logs, + raw_code=raw_code, + canceled_by=canceled_by, + canceled_reason=canceled_reason, + last_ping=last_ping, + schedule_path=schedule_path, + flow_status=flow_status, + raw_flow=raw_flow, + language=language, + ) + + queued_job.additional_properties = d + return queued_job + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_args.py b/python-client/windmill-api/windmill_api/models/queued_job_args.py new file mode 100644 index 0000000000..b671d1df48 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_args.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="QueuedJobArgs") + + +@attr.s(auto_attribs=True) +class QueuedJobArgs: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + queued_job_args = cls() + + queued_job_args.additional_properties = d + return queued_job_args + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_flow_status.py b/python-client/windmill-api/windmill_api/models/queued_job_flow_status.py new file mode 100644 index 0000000000..b1bbd60ad2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_flow_status.py @@ -0,0 +1,102 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.queued_job_flow_status_failure_module import QueuedJobFlowStatusFailureModule +from ..models.queued_job_flow_status_modules_item import QueuedJobFlowStatusModulesItem +from ..models.queued_job_flow_status_retry import QueuedJobFlowStatusRetry +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobFlowStatus") + + +@attr.s(auto_attribs=True) +class QueuedJobFlowStatus: + """ + Attributes: + step (int): + modules (List[QueuedJobFlowStatusModulesItem]): + failure_module (QueuedJobFlowStatusFailureModule): + retry (Union[Unset, QueuedJobFlowStatusRetry]): + """ + + step: int + modules: List[QueuedJobFlowStatusModulesItem] + failure_module: QueuedJobFlowStatusFailureModule + retry: Union[Unset, QueuedJobFlowStatusRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + step = self.step + modules = [] + for modules_item_data in self.modules: + modules_item = modules_item_data.to_dict() + + modules.append(modules_item) + + failure_module = self.failure_module.to_dict() + + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "step": step, + "modules": modules, + "failure_module": failure_module, + } + ) + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + step = d.pop("step") + + modules = [] + _modules = d.pop("modules") + for modules_item_data in _modules: + modules_item = QueuedJobFlowStatusModulesItem.from_dict(modules_item_data) + + modules.append(modules_item) + + failure_module = QueuedJobFlowStatusFailureModule.from_dict(d.pop("failure_module")) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, QueuedJobFlowStatusRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = QueuedJobFlowStatusRetry.from_dict(_retry) + + queued_job_flow_status = cls( + step=step, + modules=modules, + failure_module=failure_module, + retry=retry, + ) + + queued_job_flow_status.additional_properties = d + return queued_job_flow_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_flow_status_failure_module.py b/python-client/windmill-api/windmill_api/models/queued_job_flow_status_failure_module.py new file mode 100644 index 0000000000..7e2f24a73a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_flow_status_failure_module.py @@ -0,0 +1,104 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.queued_job_flow_status_failure_module_iterator import QueuedJobFlowStatusFailureModuleIterator +from ..models.queued_job_flow_status_failure_module_type import QueuedJobFlowStatusFailureModuleType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobFlowStatusFailureModule") + + +@attr.s(auto_attribs=True) +class QueuedJobFlowStatusFailureModule: + """ + Attributes: + type (QueuedJobFlowStatusFailureModuleType): + job (Union[Unset, str]): + count (Union[Unset, int]): + iterator (Union[Unset, QueuedJobFlowStatusFailureModuleIterator]): + forloop_jobs (Union[Unset, List[str]]): + """ + + type: QueuedJobFlowStatusFailureModuleType + job: Union[Unset, str] = UNSET + count: Union[Unset, int] = UNSET + iterator: Union[Unset, QueuedJobFlowStatusFailureModuleIterator] = UNSET + forloop_jobs: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + job = self.job + count = self.count + iterator: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.iterator, Unset): + iterator = self.iterator.to_dict() + + forloop_jobs: Union[Unset, List[str]] = UNSET + if not isinstance(self.forloop_jobs, Unset): + forloop_jobs = self.forloop_jobs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if job is not UNSET: + field_dict["job"] = job + if count is not UNSET: + field_dict["count"] = count + if iterator is not UNSET: + field_dict["iterator"] = iterator + if forloop_jobs is not UNSET: + field_dict["forloop_jobs"] = forloop_jobs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = QueuedJobFlowStatusFailureModuleType(d.pop("type")) + + job = d.pop("job", UNSET) + + count = d.pop("count", UNSET) + + _iterator = d.pop("iterator", UNSET) + iterator: Union[Unset, QueuedJobFlowStatusFailureModuleIterator] + if isinstance(_iterator, Unset): + iterator = UNSET + else: + iterator = QueuedJobFlowStatusFailureModuleIterator.from_dict(_iterator) + + forloop_jobs = cast(List[str], d.pop("forloop_jobs", UNSET)) + + queued_job_flow_status_failure_module = cls( + type=type, + job=job, + count=count, + iterator=iterator, + forloop_jobs=forloop_jobs, + ) + + queued_job_flow_status_failure_module.additional_properties = d + return queued_job_flow_status_failure_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_flow_status_failure_module_iterator.py b/python-client/windmill-api/windmill_api/models/queued_job_flow_status_failure_module_iterator.py new file mode 100644 index 0000000000..69f8e7aa0a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_flow_status_failure_module_iterator.py @@ -0,0 +1,76 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobFlowStatusFailureModuleIterator") + + +@attr.s(auto_attribs=True) +class QueuedJobFlowStatusFailureModuleIterator: + """ + Attributes: + index (Union[Unset, int]): + itered (Union[Unset, List[Any]]): + args (Union[Unset, Any]): + """ + + index: Union[Unset, int] = UNSET + itered: Union[Unset, List[Any]] = UNSET + args: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + index = self.index + itered: Union[Unset, List[Any]] = UNSET + if not isinstance(self.itered, Unset): + itered = self.itered + + args = self.args + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if index is not UNSET: + field_dict["index"] = index + if itered is not UNSET: + field_dict["itered"] = itered + if args is not UNSET: + field_dict["args"] = args + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + index = d.pop("index", UNSET) + + itered = cast(List[Any], d.pop("itered", UNSET)) + + args = d.pop("args", UNSET) + + queued_job_flow_status_failure_module_iterator = cls( + index=index, + itered=itered, + args=args, + ) + + queued_job_flow_status_failure_module_iterator.additional_properties = d + return queued_job_flow_status_failure_module_iterator + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_flow_status_failure_module_type.py b/python-client/windmill-api/windmill_api/models/queued_job_flow_status_failure_module_type.py new file mode 100644 index 0000000000..288e37b15e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_flow_status_failure_module_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class QueuedJobFlowStatusFailureModuleType(str, Enum): + WAITINGFORPRIORSTEPS = "WaitingForPriorSteps" + WAITINGFOREVENT = "WaitingForEvent" + WAITINGFOREXECUTOR = "WaitingForExecutor" + INPROGRESS = "InProgress" + SUCCESS = "Success" + FAILURE = "Failure" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/queued_job_flow_status_modules_item.py b/python-client/windmill-api/windmill_api/models/queued_job_flow_status_modules_item.py new file mode 100644 index 0000000000..d52ad11be7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_flow_status_modules_item.py @@ -0,0 +1,104 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.queued_job_flow_status_modules_item_iterator import QueuedJobFlowStatusModulesItemIterator +from ..models.queued_job_flow_status_modules_item_type import QueuedJobFlowStatusModulesItemType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobFlowStatusModulesItem") + + +@attr.s(auto_attribs=True) +class QueuedJobFlowStatusModulesItem: + """ + Attributes: + type (QueuedJobFlowStatusModulesItemType): + job (Union[Unset, str]): + count (Union[Unset, int]): + iterator (Union[Unset, QueuedJobFlowStatusModulesItemIterator]): + forloop_jobs (Union[Unset, List[str]]): + """ + + type: QueuedJobFlowStatusModulesItemType + job: Union[Unset, str] = UNSET + count: Union[Unset, int] = UNSET + iterator: Union[Unset, QueuedJobFlowStatusModulesItemIterator] = UNSET + forloop_jobs: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + job = self.job + count = self.count + iterator: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.iterator, Unset): + iterator = self.iterator.to_dict() + + forloop_jobs: Union[Unset, List[str]] = UNSET + if not isinstance(self.forloop_jobs, Unset): + forloop_jobs = self.forloop_jobs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if job is not UNSET: + field_dict["job"] = job + if count is not UNSET: + field_dict["count"] = count + if iterator is not UNSET: + field_dict["iterator"] = iterator + if forloop_jobs is not UNSET: + field_dict["forloop_jobs"] = forloop_jobs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = QueuedJobFlowStatusModulesItemType(d.pop("type")) + + job = d.pop("job", UNSET) + + count = d.pop("count", UNSET) + + _iterator = d.pop("iterator", UNSET) + iterator: Union[Unset, QueuedJobFlowStatusModulesItemIterator] + if isinstance(_iterator, Unset): + iterator = UNSET + else: + iterator = QueuedJobFlowStatusModulesItemIterator.from_dict(_iterator) + + forloop_jobs = cast(List[str], d.pop("forloop_jobs", UNSET)) + + queued_job_flow_status_modules_item = cls( + type=type, + job=job, + count=count, + iterator=iterator, + forloop_jobs=forloop_jobs, + ) + + queued_job_flow_status_modules_item.additional_properties = d + return queued_job_flow_status_modules_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_flow_status_modules_item_iterator.py b/python-client/windmill-api/windmill_api/models/queued_job_flow_status_modules_item_iterator.py new file mode 100644 index 0000000000..a08c64ff24 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_flow_status_modules_item_iterator.py @@ -0,0 +1,76 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobFlowStatusModulesItemIterator") + + +@attr.s(auto_attribs=True) +class QueuedJobFlowStatusModulesItemIterator: + """ + Attributes: + index (Union[Unset, int]): + itered (Union[Unset, List[Any]]): + args (Union[Unset, Any]): + """ + + index: Union[Unset, int] = UNSET + itered: Union[Unset, List[Any]] = UNSET + args: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + index = self.index + itered: Union[Unset, List[Any]] = UNSET + if not isinstance(self.itered, Unset): + itered = self.itered + + args = self.args + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if index is not UNSET: + field_dict["index"] = index + if itered is not UNSET: + field_dict["itered"] = itered + if args is not UNSET: + field_dict["args"] = args + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + index = d.pop("index", UNSET) + + itered = cast(List[Any], d.pop("itered", UNSET)) + + args = d.pop("args", UNSET) + + queued_job_flow_status_modules_item_iterator = cls( + index=index, + itered=itered, + args=args, + ) + + queued_job_flow_status_modules_item_iterator.additional_properties = d + return queued_job_flow_status_modules_item_iterator + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_flow_status_modules_item_type.py b/python-client/windmill-api/windmill_api/models/queued_job_flow_status_modules_item_type.py new file mode 100644 index 0000000000..5cfe7afef6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_flow_status_modules_item_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class QueuedJobFlowStatusModulesItemType(str, Enum): + WAITINGFORPRIORSTEPS = "WaitingForPriorSteps" + WAITINGFOREVENT = "WaitingForEvent" + WAITINGFOREXECUTOR = "WaitingForExecutor" + INPROGRESS = "InProgress" + SUCCESS = "Success" + FAILURE = "Failure" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/queued_job_flow_status_retry.py b/python-client/windmill-api/windmill_api/models/queued_job_flow_status_retry.py new file mode 100644 index 0000000000..b338ef6aae --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_flow_status_retry.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobFlowStatusRetry") + + +@attr.s(auto_attribs=True) +class QueuedJobFlowStatusRetry: + """ + Attributes: + fail_count (Union[Unset, int]): + """ + + fail_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + fail_count = self.fail_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if fail_count is not UNSET: + field_dict["fail_count"] = fail_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + fail_count = d.pop("fail_count", UNSET) + + queued_job_flow_status_retry = cls( + fail_count=fail_count, + ) + + queued_job_flow_status_retry.additional_properties = d + return queued_job_flow_status_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_job_kind.py b/python-client/windmill-api/windmill_api/models/queued_job_job_kind.py new file mode 100644 index 0000000000..c827a0594f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_job_kind.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class QueuedJobJobKind(str, Enum): + SCRIPT = "script" + PREVIEW = "preview" + DEPENDENCIES = "dependencies" + FLOW = "flow" + FLOWPREVIEW = "flowpreview" + SCRIPT_HUB = "script_hub" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/queued_job_language.py b/python-client/windmill-api/windmill_api/models/queued_job_language.py new file mode 100644 index 0000000000..898967d735 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class QueuedJobLanguage(str, Enum): + PYTHON3 = "python3" + DENO = "deno" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow.py new file mode 100644 index 0000000000..a82e1e3220 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow.py @@ -0,0 +1,95 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.queued_job_raw_flow_failure_module import QueuedJobRawFlowFailureModule +from ..models.queued_job_raw_flow_modules_item import QueuedJobRawFlowModulesItem +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobRawFlow") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlow: + """ + Attributes: + modules (List[QueuedJobRawFlowModulesItem]): + failure_module (Union[Unset, QueuedJobRawFlowFailureModule]): + same_worker (Union[Unset, bool]): + """ + + modules: List[QueuedJobRawFlowModulesItem] + failure_module: Union[Unset, QueuedJobRawFlowFailureModule] = UNSET + same_worker: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + modules = [] + for modules_item_data in self.modules: + modules_item = modules_item_data.to_dict() + + modules.append(modules_item) + + failure_module: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.failure_module, Unset): + failure_module = self.failure_module.to_dict() + + same_worker = self.same_worker + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "modules": modules, + } + ) + if failure_module is not UNSET: + field_dict["failure_module"] = failure_module + if same_worker is not UNSET: + field_dict["same_worker"] = same_worker + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + modules = [] + _modules = d.pop("modules") + for modules_item_data in _modules: + modules_item = QueuedJobRawFlowModulesItem.from_dict(modules_item_data) + + modules.append(modules_item) + + _failure_module = d.pop("failure_module", UNSET) + failure_module: Union[Unset, QueuedJobRawFlowFailureModule] + if isinstance(_failure_module, Unset): + failure_module = UNSET + else: + failure_module = QueuedJobRawFlowFailureModule.from_dict(_failure_module) + + same_worker = d.pop("same_worker", UNSET) + + queued_job_raw_flow = cls( + modules=modules, + failure_module=failure_module, + same_worker=same_worker, + ) + + queued_job_raw_flow.additional_properties = d + return queued_job_raw_flow + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module.py new file mode 100644 index 0000000000..eb8cef93a7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module.py @@ -0,0 +1,228 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.queued_job_raw_flow_failure_module_input_transforms import QueuedJobRawFlowFailureModuleInputTransforms +from ..models.queued_job_raw_flow_failure_module_retry import QueuedJobRawFlowFailureModuleRetry +from ..models.queued_job_raw_flow_failure_module_sleep_type_0 import QueuedJobRawFlowFailureModuleSleepType0 +from ..models.queued_job_raw_flow_failure_module_sleep_type_1 import QueuedJobRawFlowFailureModuleSleepType1 +from ..models.queued_job_raw_flow_failure_module_stop_after_if import QueuedJobRawFlowFailureModuleStopAfterIf +from ..models.queued_job_raw_flow_failure_module_value_type_0 import QueuedJobRawFlowFailureModuleValueType0 +from ..models.queued_job_raw_flow_failure_module_value_type_1 import QueuedJobRawFlowFailureModuleValueType1 +from ..models.queued_job_raw_flow_failure_module_value_type_2 import QueuedJobRawFlowFailureModuleValueType2 +from ..models.queued_job_raw_flow_failure_module_value_type_3 import QueuedJobRawFlowFailureModuleValueType3 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobRawFlowFailureModule") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowFailureModule: + """ + Attributes: + input_transforms (QueuedJobRawFlowFailureModuleInputTransforms): + value (Union[QueuedJobRawFlowFailureModuleValueType0, QueuedJobRawFlowFailureModuleValueType1, + QueuedJobRawFlowFailureModuleValueType2, QueuedJobRawFlowFailureModuleValueType3]): + stop_after_if (Union[Unset, QueuedJobRawFlowFailureModuleStopAfterIf]): + sleep (Union[QueuedJobRawFlowFailureModuleSleepType0, QueuedJobRawFlowFailureModuleSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, QueuedJobRawFlowFailureModuleRetry]): + """ + + input_transforms: QueuedJobRawFlowFailureModuleInputTransforms + value: Union[ + QueuedJobRawFlowFailureModuleValueType0, + QueuedJobRawFlowFailureModuleValueType1, + QueuedJobRawFlowFailureModuleValueType2, + QueuedJobRawFlowFailureModuleValueType3, + ] + stop_after_if: Union[Unset, QueuedJobRawFlowFailureModuleStopAfterIf] = UNSET + sleep: Union[QueuedJobRawFlowFailureModuleSleepType0, QueuedJobRawFlowFailureModuleSleepType1, Unset] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, QueuedJobRawFlowFailureModuleRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, QueuedJobRawFlowFailureModuleValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, QueuedJobRawFlowFailureModuleValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, QueuedJobRawFlowFailureModuleValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, QueuedJobRawFlowFailureModuleSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = QueuedJobRawFlowFailureModuleInputTransforms.from_dict(d.pop("input_transforms")) + + def _parse_value( + data: object, + ) -> Union[ + QueuedJobRawFlowFailureModuleValueType0, + QueuedJobRawFlowFailureModuleValueType1, + QueuedJobRawFlowFailureModuleValueType2, + QueuedJobRawFlowFailureModuleValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = QueuedJobRawFlowFailureModuleValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = QueuedJobRawFlowFailureModuleValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = QueuedJobRawFlowFailureModuleValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = QueuedJobRawFlowFailureModuleValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, QueuedJobRawFlowFailureModuleStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = QueuedJobRawFlowFailureModuleStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[QueuedJobRawFlowFailureModuleSleepType0, QueuedJobRawFlowFailureModuleSleepType1, Unset]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, QueuedJobRawFlowFailureModuleSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = QueuedJobRawFlowFailureModuleSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, QueuedJobRawFlowFailureModuleSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = QueuedJobRawFlowFailureModuleSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, QueuedJobRawFlowFailureModuleRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = QueuedJobRawFlowFailureModuleRetry.from_dict(_retry) + + queued_job_raw_flow_failure_module = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + queued_job_raw_flow_failure_module.additional_properties = d + return queued_job_raw_flow_failure_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_input_transforms.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_input_transforms.py new file mode 100644 index 0000000000..29c866335d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_input_transforms.py @@ -0,0 +1,107 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.queued_job_raw_flow_failure_module_input_transforms_additional_property_type_0 import ( + QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0, +) +from ..models.queued_job_raw_flow_failure_module_input_transforms_additional_property_type_1 import ( + QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="QueuedJobRawFlowFailureModuleInputTransforms") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowFailureModuleInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0, + QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + queued_job_raw_flow_failure_module_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0, + QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0.from_dict(data) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1.from_dict(data) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + queued_job_raw_flow_failure_module_input_transforms.additional_properties = additional_properties + return queued_job_raw_flow_failure_module_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0, + QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0, + QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..992d02209d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_input_transforms_additional_property_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.queued_job_raw_flow_failure_module_input_transforms_additional_property_type_0_type import ( + QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + queued_job_raw_flow_failure_module_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + queued_job_raw_flow_failure_module_input_transforms_additional_property_type_0.additional_properties = d + return queued_job_raw_flow_failure_module_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..29cfa65cca --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..d3cf094cdb --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_input_transforms_additional_property_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.queued_job_raw_flow_failure_module_input_transforms_additional_property_type_1_type import ( + QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + queued_job_raw_flow_failure_module_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + queued_job_raw_flow_failure_module_input_transforms_additional_property_type_1.additional_properties = d + return queued_job_raw_flow_failure_module_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..aafc698fc6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class QueuedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_retry.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_retry.py new file mode 100644 index 0000000000..198b7b4402 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_retry.py @@ -0,0 +1,82 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.queued_job_raw_flow_failure_module_retry_constant import QueuedJobRawFlowFailureModuleRetryConstant +from ..models.queued_job_raw_flow_failure_module_retry_exponential import QueuedJobRawFlowFailureModuleRetryExponential +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobRawFlowFailureModuleRetry") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowFailureModuleRetry: + """ + Attributes: + constant (Union[Unset, QueuedJobRawFlowFailureModuleRetryConstant]): + exponential (Union[Unset, QueuedJobRawFlowFailureModuleRetryExponential]): + """ + + constant: Union[Unset, QueuedJobRawFlowFailureModuleRetryConstant] = UNSET + exponential: Union[Unset, QueuedJobRawFlowFailureModuleRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, QueuedJobRawFlowFailureModuleRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = QueuedJobRawFlowFailureModuleRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, QueuedJobRawFlowFailureModuleRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = QueuedJobRawFlowFailureModuleRetryExponential.from_dict(_exponential) + + queued_job_raw_flow_failure_module_retry = cls( + constant=constant, + exponential=exponential, + ) + + queued_job_raw_flow_failure_module_retry.additional_properties = d + return queued_job_raw_flow_failure_module_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_retry_constant.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_retry_constant.py new file mode 100644 index 0000000000..c51264ebda --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobRawFlowFailureModuleRetryConstant") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowFailureModuleRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + queued_job_raw_flow_failure_module_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + queued_job_raw_flow_failure_module_retry_constant.additional_properties = d + return queued_job_raw_flow_failure_module_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_retry_exponential.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_retry_exponential.py new file mode 100644 index 0000000000..6ef065f40e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobRawFlowFailureModuleRetryExponential") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowFailureModuleRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + queued_job_raw_flow_failure_module_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + queued_job_raw_flow_failure_module_retry_exponential.additional_properties = d + return queued_job_raw_flow_failure_module_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_sleep_type_0.py new file mode 100644 index 0000000000..caa0e647cf --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_sleep_type_0.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.queued_job_raw_flow_failure_module_sleep_type_0_type import QueuedJobRawFlowFailureModuleSleepType0Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobRawFlowFailureModuleSleepType0") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowFailureModuleSleepType0: + """ + Attributes: + type (QueuedJobRawFlowFailureModuleSleepType0Type): + value (Union[Unset, Any]): + """ + + type: QueuedJobRawFlowFailureModuleSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = QueuedJobRawFlowFailureModuleSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + queued_job_raw_flow_failure_module_sleep_type_0 = cls( + type=type, + value=value, + ) + + queued_job_raw_flow_failure_module_sleep_type_0.additional_properties = d + return queued_job_raw_flow_failure_module_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_sleep_type_0_type.py new file mode 100644 index 0000000000..9aa47dc335 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class QueuedJobRawFlowFailureModuleSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_sleep_type_1.py new file mode 100644 index 0000000000..4991dd96ca --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_sleep_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.queued_job_raw_flow_failure_module_sleep_type_1_type import QueuedJobRawFlowFailureModuleSleepType1Type + +T = TypeVar("T", bound="QueuedJobRawFlowFailureModuleSleepType1") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowFailureModuleSleepType1: + """ + Attributes: + expr (str): + type (QueuedJobRawFlowFailureModuleSleepType1Type): + """ + + expr: str + type: QueuedJobRawFlowFailureModuleSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = QueuedJobRawFlowFailureModuleSleepType1Type(d.pop("type")) + + queued_job_raw_flow_failure_module_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + queued_job_raw_flow_failure_module_sleep_type_1.additional_properties = d + return queued_job_raw_flow_failure_module_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_sleep_type_1_type.py new file mode 100644 index 0000000000..51c3a98f25 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class QueuedJobRawFlowFailureModuleSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_stop_after_if.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_stop_after_if.py new file mode 100644 index 0000000000..f50ab474d4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobRawFlowFailureModuleStopAfterIf") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowFailureModuleStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + queued_job_raw_flow_failure_module_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + queued_job_raw_flow_failure_module_stop_after_if.additional_properties = d + return queued_job_raw_flow_failure_module_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_0.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_0.py new file mode 100644 index 0000000000..8585d0e89a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.queued_job_raw_flow_failure_module_value_type_0_language import ( + QueuedJobRawFlowFailureModuleValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobRawFlowFailureModuleValueType0") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowFailureModuleValueType0: + """ + Attributes: + content (str): + language (QueuedJobRawFlowFailureModuleValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: QueuedJobRawFlowFailureModuleValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = QueuedJobRawFlowFailureModuleValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + queued_job_raw_flow_failure_module_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + queued_job_raw_flow_failure_module_value_type_0.additional_properties = d + return queued_job_raw_flow_failure_module_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_0_language.py new file mode 100644 index 0000000000..f1a0c408a1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class QueuedJobRawFlowFailureModuleValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_1.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_1.py new file mode 100644 index 0000000000..aee34822b1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.queued_job_raw_flow_failure_module_value_type_1_type import QueuedJobRawFlowFailureModuleValueType1Type + +T = TypeVar("T", bound="QueuedJobRawFlowFailureModuleValueType1") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowFailureModuleValueType1: + """ + Attributes: + path (str): + type (QueuedJobRawFlowFailureModuleValueType1Type): + """ + + path: str + type: QueuedJobRawFlowFailureModuleValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = QueuedJobRawFlowFailureModuleValueType1Type(d.pop("type")) + + queued_job_raw_flow_failure_module_value_type_1 = cls( + path=path, + type=type, + ) + + queued_job_raw_flow_failure_module_value_type_1.additional_properties = d + return queued_job_raw_flow_failure_module_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_1_type.py new file mode 100644 index 0000000000..7d5ceaea8a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class QueuedJobRawFlowFailureModuleValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2.py new file mode 100644 index 0000000000..a0f0f4c87d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2.py @@ -0,0 +1,108 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.queued_job_raw_flow_failure_module_value_type_2_iterator_type_0 import ( + QueuedJobRawFlowFailureModuleValueType2IteratorType0, +) +from ..models.queued_job_raw_flow_failure_module_value_type_2_iterator_type_1 import ( + QueuedJobRawFlowFailureModuleValueType2IteratorType1, +) +from ..models.queued_job_raw_flow_failure_module_value_type_2_type import QueuedJobRawFlowFailureModuleValueType2Type + +T = TypeVar("T", bound="QueuedJobRawFlowFailureModuleValueType2") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowFailureModuleValueType2: + """ + Attributes: + iterator (Union[QueuedJobRawFlowFailureModuleValueType2IteratorType0, + QueuedJobRawFlowFailureModuleValueType2IteratorType1]): + skip_failures (bool): + type (QueuedJobRawFlowFailureModuleValueType2Type): + """ + + iterator: Union[ + QueuedJobRawFlowFailureModuleValueType2IteratorType0, QueuedJobRawFlowFailureModuleValueType2IteratorType1 + ] + skip_failures: bool + type: QueuedJobRawFlowFailureModuleValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, QueuedJobRawFlowFailureModuleValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + QueuedJobRawFlowFailureModuleValueType2IteratorType0, QueuedJobRawFlowFailureModuleValueType2IteratorType1 + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = QueuedJobRawFlowFailureModuleValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = QueuedJobRawFlowFailureModuleValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = QueuedJobRawFlowFailureModuleValueType2Type(d.pop("type")) + + queued_job_raw_flow_failure_module_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + queued_job_raw_flow_failure_module_value_type_2.additional_properties = d + return queued_job_raw_flow_failure_module_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..000c12e795 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.queued_job_raw_flow_failure_module_value_type_2_iterator_type_0_type import ( + QueuedJobRawFlowFailureModuleValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobRawFlowFailureModuleValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowFailureModuleValueType2IteratorType0: + """ + Attributes: + type (QueuedJobRawFlowFailureModuleValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: QueuedJobRawFlowFailureModuleValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = QueuedJobRawFlowFailureModuleValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + queued_job_raw_flow_failure_module_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + queued_job_raw_flow_failure_module_value_type_2_iterator_type_0.additional_properties = d + return queued_job_raw_flow_failure_module_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..843a2c33ed --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class QueuedJobRawFlowFailureModuleValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..fac5e02097 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.queued_job_raw_flow_failure_module_value_type_2_iterator_type_1_type import ( + QueuedJobRawFlowFailureModuleValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="QueuedJobRawFlowFailureModuleValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowFailureModuleValueType2IteratorType1: + """ + Attributes: + expr (str): + type (QueuedJobRawFlowFailureModuleValueType2IteratorType1Type): + """ + + expr: str + type: QueuedJobRawFlowFailureModuleValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = QueuedJobRawFlowFailureModuleValueType2IteratorType1Type(d.pop("type")) + + queued_job_raw_flow_failure_module_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + queued_job_raw_flow_failure_module_value_type_2_iterator_type_1.additional_properties = d + return queued_job_raw_flow_failure_module_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..05962c3864 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class QueuedJobRawFlowFailureModuleValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2_type.py new file mode 100644 index 0000000000..2bb4bc7dd6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class QueuedJobRawFlowFailureModuleValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_3.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_3.py new file mode 100644 index 0000000000..83cc3d1b33 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_3.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.queued_job_raw_flow_failure_module_value_type_3_type import QueuedJobRawFlowFailureModuleValueType3Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobRawFlowFailureModuleValueType3") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowFailureModuleValueType3: + """ + Attributes: + type (QueuedJobRawFlowFailureModuleValueType3Type): + path (Union[Unset, str]): + """ + + type: QueuedJobRawFlowFailureModuleValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = QueuedJobRawFlowFailureModuleValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + queued_job_raw_flow_failure_module_value_type_3 = cls( + type=type, + path=path, + ) + + queued_job_raw_flow_failure_module_value_type_3.additional_properties = d + return queued_job_raw_flow_failure_module_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_3_type.py new file mode 100644 index 0000000000..208d5d70b0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_failure_module_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class QueuedJobRawFlowFailureModuleValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item.py new file mode 100644 index 0000000000..d947432fe0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item.py @@ -0,0 +1,228 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.queued_job_raw_flow_modules_item_input_transforms import QueuedJobRawFlowModulesItemInputTransforms +from ..models.queued_job_raw_flow_modules_item_retry import QueuedJobRawFlowModulesItemRetry +from ..models.queued_job_raw_flow_modules_item_sleep_type_0 import QueuedJobRawFlowModulesItemSleepType0 +from ..models.queued_job_raw_flow_modules_item_sleep_type_1 import QueuedJobRawFlowModulesItemSleepType1 +from ..models.queued_job_raw_flow_modules_item_stop_after_if import QueuedJobRawFlowModulesItemStopAfterIf +from ..models.queued_job_raw_flow_modules_item_value_type_0 import QueuedJobRawFlowModulesItemValueType0 +from ..models.queued_job_raw_flow_modules_item_value_type_1 import QueuedJobRawFlowModulesItemValueType1 +from ..models.queued_job_raw_flow_modules_item_value_type_2 import QueuedJobRawFlowModulesItemValueType2 +from ..models.queued_job_raw_flow_modules_item_value_type_3 import QueuedJobRawFlowModulesItemValueType3 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobRawFlowModulesItem") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowModulesItem: + """ + Attributes: + input_transforms (QueuedJobRawFlowModulesItemInputTransforms): + value (Union[QueuedJobRawFlowModulesItemValueType0, QueuedJobRawFlowModulesItemValueType1, + QueuedJobRawFlowModulesItemValueType2, QueuedJobRawFlowModulesItemValueType3]): + stop_after_if (Union[Unset, QueuedJobRawFlowModulesItemStopAfterIf]): + sleep (Union[QueuedJobRawFlowModulesItemSleepType0, QueuedJobRawFlowModulesItemSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, QueuedJobRawFlowModulesItemRetry]): + """ + + input_transforms: QueuedJobRawFlowModulesItemInputTransforms + value: Union[ + QueuedJobRawFlowModulesItemValueType0, + QueuedJobRawFlowModulesItemValueType1, + QueuedJobRawFlowModulesItemValueType2, + QueuedJobRawFlowModulesItemValueType3, + ] + stop_after_if: Union[Unset, QueuedJobRawFlowModulesItemStopAfterIf] = UNSET + sleep: Union[QueuedJobRawFlowModulesItemSleepType0, QueuedJobRawFlowModulesItemSleepType1, Unset] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, QueuedJobRawFlowModulesItemRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, QueuedJobRawFlowModulesItemValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, QueuedJobRawFlowModulesItemValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, QueuedJobRawFlowModulesItemValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, QueuedJobRawFlowModulesItemSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = QueuedJobRawFlowModulesItemInputTransforms.from_dict(d.pop("input_transforms")) + + def _parse_value( + data: object, + ) -> Union[ + QueuedJobRawFlowModulesItemValueType0, + QueuedJobRawFlowModulesItemValueType1, + QueuedJobRawFlowModulesItemValueType2, + QueuedJobRawFlowModulesItemValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = QueuedJobRawFlowModulesItemValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = QueuedJobRawFlowModulesItemValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = QueuedJobRawFlowModulesItemValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = QueuedJobRawFlowModulesItemValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, QueuedJobRawFlowModulesItemStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = QueuedJobRawFlowModulesItemStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[QueuedJobRawFlowModulesItemSleepType0, QueuedJobRawFlowModulesItemSleepType1, Unset]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, QueuedJobRawFlowModulesItemSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = QueuedJobRawFlowModulesItemSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, QueuedJobRawFlowModulesItemSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = QueuedJobRawFlowModulesItemSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, QueuedJobRawFlowModulesItemRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = QueuedJobRawFlowModulesItemRetry.from_dict(_retry) + + queued_job_raw_flow_modules_item = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + queued_job_raw_flow_modules_item.additional_properties = d + return queued_job_raw_flow_modules_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_input_transforms.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_input_transforms.py new file mode 100644 index 0000000000..2ffa28f09b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_input_transforms.py @@ -0,0 +1,107 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.queued_job_raw_flow_modules_item_input_transforms_additional_property_type_0 import ( + QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0, +) +from ..models.queued_job_raw_flow_modules_item_input_transforms_additional_property_type_1 import ( + QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="QueuedJobRawFlowModulesItemInputTransforms") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowModulesItemInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0, + QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + queued_job_raw_flow_modules_item_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0, + QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0.from_dict(data) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1.from_dict(data) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + queued_job_raw_flow_modules_item_input_transforms.additional_properties = additional_properties + return queued_job_raw_flow_modules_item_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0, + QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0, + QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..516ea0cab3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_input_transforms_additional_property_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.queued_job_raw_flow_modules_item_input_transforms_additional_property_type_0_type import ( + QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + queued_job_raw_flow_modules_item_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + queued_job_raw_flow_modules_item_input_transforms_additional_property_type_0.additional_properties = d + return queued_job_raw_flow_modules_item_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..0a08a640fc --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..20ee655338 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_input_transforms_additional_property_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.queued_job_raw_flow_modules_item_input_transforms_additional_property_type_1_type import ( + QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + queued_job_raw_flow_modules_item_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + queued_job_raw_flow_modules_item_input_transforms_additional_property_type_1.additional_properties = d + return queued_job_raw_flow_modules_item_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..f9330863c4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class QueuedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_retry.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_retry.py new file mode 100644 index 0000000000..baf311f240 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_retry.py @@ -0,0 +1,82 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.queued_job_raw_flow_modules_item_retry_constant import QueuedJobRawFlowModulesItemRetryConstant +from ..models.queued_job_raw_flow_modules_item_retry_exponential import QueuedJobRawFlowModulesItemRetryExponential +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobRawFlowModulesItemRetry") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowModulesItemRetry: + """ + Attributes: + constant (Union[Unset, QueuedJobRawFlowModulesItemRetryConstant]): + exponential (Union[Unset, QueuedJobRawFlowModulesItemRetryExponential]): + """ + + constant: Union[Unset, QueuedJobRawFlowModulesItemRetryConstant] = UNSET + exponential: Union[Unset, QueuedJobRawFlowModulesItemRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, QueuedJobRawFlowModulesItemRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = QueuedJobRawFlowModulesItemRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, QueuedJobRawFlowModulesItemRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = QueuedJobRawFlowModulesItemRetryExponential.from_dict(_exponential) + + queued_job_raw_flow_modules_item_retry = cls( + constant=constant, + exponential=exponential, + ) + + queued_job_raw_flow_modules_item_retry.additional_properties = d + return queued_job_raw_flow_modules_item_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_retry_constant.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_retry_constant.py new file mode 100644 index 0000000000..699f2e60bc --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobRawFlowModulesItemRetryConstant") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowModulesItemRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + queued_job_raw_flow_modules_item_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + queued_job_raw_flow_modules_item_retry_constant.additional_properties = d + return queued_job_raw_flow_modules_item_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_retry_exponential.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_retry_exponential.py new file mode 100644 index 0000000000..74ce5870bd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobRawFlowModulesItemRetryExponential") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowModulesItemRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + queued_job_raw_flow_modules_item_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + queued_job_raw_flow_modules_item_retry_exponential.additional_properties = d + return queued_job_raw_flow_modules_item_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_sleep_type_0.py new file mode 100644 index 0000000000..5ddd3a3fb0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_sleep_type_0.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.queued_job_raw_flow_modules_item_sleep_type_0_type import QueuedJobRawFlowModulesItemSleepType0Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobRawFlowModulesItemSleepType0") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowModulesItemSleepType0: + """ + Attributes: + type (QueuedJobRawFlowModulesItemSleepType0Type): + value (Union[Unset, Any]): + """ + + type: QueuedJobRawFlowModulesItemSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = QueuedJobRawFlowModulesItemSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + queued_job_raw_flow_modules_item_sleep_type_0 = cls( + type=type, + value=value, + ) + + queued_job_raw_flow_modules_item_sleep_type_0.additional_properties = d + return queued_job_raw_flow_modules_item_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_sleep_type_0_type.py new file mode 100644 index 0000000000..1e31016f79 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class QueuedJobRawFlowModulesItemSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_sleep_type_1.py new file mode 100644 index 0000000000..75e8093f8d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_sleep_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.queued_job_raw_flow_modules_item_sleep_type_1_type import QueuedJobRawFlowModulesItemSleepType1Type + +T = TypeVar("T", bound="QueuedJobRawFlowModulesItemSleepType1") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowModulesItemSleepType1: + """ + Attributes: + expr (str): + type (QueuedJobRawFlowModulesItemSleepType1Type): + """ + + expr: str + type: QueuedJobRawFlowModulesItemSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = QueuedJobRawFlowModulesItemSleepType1Type(d.pop("type")) + + queued_job_raw_flow_modules_item_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + queued_job_raw_flow_modules_item_sleep_type_1.additional_properties = d + return queued_job_raw_flow_modules_item_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_sleep_type_1_type.py new file mode 100644 index 0000000000..488cca5f9d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class QueuedJobRawFlowModulesItemSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_stop_after_if.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_stop_after_if.py new file mode 100644 index 0000000000..05ad46dee1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobRawFlowModulesItemStopAfterIf") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowModulesItemStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + queued_job_raw_flow_modules_item_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + queued_job_raw_flow_modules_item_stop_after_if.additional_properties = d + return queued_job_raw_flow_modules_item_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_0.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_0.py new file mode 100644 index 0000000000..76cc9c0d30 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.queued_job_raw_flow_modules_item_value_type_0_language import ( + QueuedJobRawFlowModulesItemValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobRawFlowModulesItemValueType0") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowModulesItemValueType0: + """ + Attributes: + content (str): + language (QueuedJobRawFlowModulesItemValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: QueuedJobRawFlowModulesItemValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = QueuedJobRawFlowModulesItemValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + queued_job_raw_flow_modules_item_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + queued_job_raw_flow_modules_item_value_type_0.additional_properties = d + return queued_job_raw_flow_modules_item_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_0_language.py new file mode 100644 index 0000000000..8fa8341df1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class QueuedJobRawFlowModulesItemValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_1.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_1.py new file mode 100644 index 0000000000..dc37a2d1a7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_1.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.queued_job_raw_flow_modules_item_value_type_1_type import QueuedJobRawFlowModulesItemValueType1Type + +T = TypeVar("T", bound="QueuedJobRawFlowModulesItemValueType1") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowModulesItemValueType1: + """ + Attributes: + path (str): + type (QueuedJobRawFlowModulesItemValueType1Type): + """ + + path: str + type: QueuedJobRawFlowModulesItemValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = QueuedJobRawFlowModulesItemValueType1Type(d.pop("type")) + + queued_job_raw_flow_modules_item_value_type_1 = cls( + path=path, + type=type, + ) + + queued_job_raw_flow_modules_item_value_type_1.additional_properties = d + return queued_job_raw_flow_modules_item_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_1_type.py new file mode 100644 index 0000000000..381afb73ba --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class QueuedJobRawFlowModulesItemValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2.py new file mode 100644 index 0000000000..5258e514b4 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2.py @@ -0,0 +1,108 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.queued_job_raw_flow_modules_item_value_type_2_iterator_type_0 import ( + QueuedJobRawFlowModulesItemValueType2IteratorType0, +) +from ..models.queued_job_raw_flow_modules_item_value_type_2_iterator_type_1 import ( + QueuedJobRawFlowModulesItemValueType2IteratorType1, +) +from ..models.queued_job_raw_flow_modules_item_value_type_2_type import QueuedJobRawFlowModulesItemValueType2Type + +T = TypeVar("T", bound="QueuedJobRawFlowModulesItemValueType2") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowModulesItemValueType2: + """ + Attributes: + iterator (Union[QueuedJobRawFlowModulesItemValueType2IteratorType0, + QueuedJobRawFlowModulesItemValueType2IteratorType1]): + skip_failures (bool): + type (QueuedJobRawFlowModulesItemValueType2Type): + """ + + iterator: Union[ + QueuedJobRawFlowModulesItemValueType2IteratorType0, QueuedJobRawFlowModulesItemValueType2IteratorType1 + ] + skip_failures: bool + type: QueuedJobRawFlowModulesItemValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, QueuedJobRawFlowModulesItemValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + QueuedJobRawFlowModulesItemValueType2IteratorType0, QueuedJobRawFlowModulesItemValueType2IteratorType1 + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = QueuedJobRawFlowModulesItemValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = QueuedJobRawFlowModulesItemValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = QueuedJobRawFlowModulesItemValueType2Type(d.pop("type")) + + queued_job_raw_flow_modules_item_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + queued_job_raw_flow_modules_item_value_type_2.additional_properties = d + return queued_job_raw_flow_modules_item_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..240884d60c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.queued_job_raw_flow_modules_item_value_type_2_iterator_type_0_type import ( + QueuedJobRawFlowModulesItemValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobRawFlowModulesItemValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowModulesItemValueType2IteratorType0: + """ + Attributes: + type (QueuedJobRawFlowModulesItemValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: QueuedJobRawFlowModulesItemValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = QueuedJobRawFlowModulesItemValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + queued_job_raw_flow_modules_item_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + queued_job_raw_flow_modules_item_value_type_2_iterator_type_0.additional_properties = d + return queued_job_raw_flow_modules_item_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..33169fb45a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class QueuedJobRawFlowModulesItemValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..065315517a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.queued_job_raw_flow_modules_item_value_type_2_iterator_type_1_type import ( + QueuedJobRawFlowModulesItemValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="QueuedJobRawFlowModulesItemValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowModulesItemValueType2IteratorType1: + """ + Attributes: + expr (str): + type (QueuedJobRawFlowModulesItemValueType2IteratorType1Type): + """ + + expr: str + type: QueuedJobRawFlowModulesItemValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = QueuedJobRawFlowModulesItemValueType2IteratorType1Type(d.pop("type")) + + queued_job_raw_flow_modules_item_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + queued_job_raw_flow_modules_item_value_type_2_iterator_type_1.additional_properties = d + return queued_job_raw_flow_modules_item_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..da9e92c73c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class QueuedJobRawFlowModulesItemValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2_type.py new file mode 100644 index 0000000000..abf80b6efd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class QueuedJobRawFlowModulesItemValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_3.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_3.py new file mode 100644 index 0000000000..8d7a5b38a0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_3.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.queued_job_raw_flow_modules_item_value_type_3_type import QueuedJobRawFlowModulesItemValueType3Type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueuedJobRawFlowModulesItemValueType3") + + +@attr.s(auto_attribs=True) +class QueuedJobRawFlowModulesItemValueType3: + """ + Attributes: + type (QueuedJobRawFlowModulesItemValueType3Type): + path (Union[Unset, str]): + """ + + type: QueuedJobRawFlowModulesItemValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = QueuedJobRawFlowModulesItemValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + queued_job_raw_flow_modules_item_value_type_3 = cls( + type=type, + path=path, + ) + + queued_job_raw_flow_modules_item_value_type_3.additional_properties = d + return queued_job_raw_flow_modules_item_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_3_type.py new file mode 100644 index 0000000000..634c261300 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/queued_job_raw_flow_modules_item_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class QueuedJobRawFlowModulesItemValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/raw_script.py b/python-client/windmill-api/windmill_api/models/raw_script.py new file mode 100644 index 0000000000..bf9fc8876e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/raw_script.py @@ -0,0 +1,83 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.raw_script_language import RawScriptLanguage +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RawScript") + + +@attr.s(auto_attribs=True) +class RawScript: + """ + Attributes: + content (str): + language (RawScriptLanguage): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: RawScriptLanguage + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = RawScriptLanguage(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + raw_script = cls( + content=content, + language=language, + type=type, + path=path, + ) + + raw_script.additional_properties = d + return raw_script + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/raw_script_language.py b/python-client/windmill-api/windmill_api/models/raw_script_language.py new file mode 100644 index 0000000000..6ffaee4ec5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/raw_script_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class RawScriptLanguage(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/refresh_token_json_body.py b/python-client/windmill-api/windmill_api/models/refresh_token_json_body.py new file mode 100644 index 0000000000..c7ff55a1fc --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/refresh_token_json_body.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="RefreshTokenJsonBody") + + +@attr.s(auto_attribs=True) +class RefreshTokenJsonBody: + """ + Attributes: + path (str): + """ + + path: str + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + refresh_token_json_body = cls( + path=path, + ) + + refresh_token_json_body.additional_properties = d + return refresh_token_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/remove_granular_acls_json_body.py b/python-client/windmill-api/windmill_api/models/remove_granular_acls_json_body.py new file mode 100644 index 0000000000..00154e211e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/remove_granular_acls_json_body.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="RemoveGranularAclsJsonBody") + + +@attr.s(auto_attribs=True) +class RemoveGranularAclsJsonBody: + """ + Attributes: + owner (str): + """ + + owner: str + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + owner = self.owner + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "owner": owner, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + owner = d.pop("owner") + + remove_granular_acls_json_body = cls( + owner=owner, + ) + + remove_granular_acls_json_body.additional_properties = d + return remove_granular_acls_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/remove_granular_acls_kind.py b/python-client/windmill-api/windmill_api/models/remove_granular_acls_kind.py new file mode 100644 index 0000000000..e51e56ca4c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/remove_granular_acls_kind.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class RemoveGranularAclsKind(str, Enum): + SCRIPT = "script" + GROUP = "group_" + RESOURCE = "resource" + SCHEDULE = "schedule" + VARIABLE = "variable" + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/remove_user_to_group_json_body.py b/python-client/windmill-api/windmill_api/models/remove_user_to_group_json_body.py new file mode 100644 index 0000000000..ee6adfec6e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/remove_user_to_group_json_body.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RemoveUserToGroupJsonBody") + + +@attr.s(auto_attribs=True) +class RemoveUserToGroupJsonBody: + """ + Attributes: + username (Union[Unset, str]): + """ + + username: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + username = self.username + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if username is not UNSET: + field_dict["username"] = username + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + username = d.pop("username", UNSET) + + remove_user_to_group_json_body = cls( + username=username, + ) + + remove_user_to_group_json_body.additional_properties = d + return remove_user_to_group_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/resource.py b/python-client/windmill-api/windmill_api/models/resource.py new file mode 100644 index 0000000000..9d7eff5100 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/resource.py @@ -0,0 +1,122 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.resource_extra_perms import ResourceExtraPerms +from ..models.resource_value import ResourceValue +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Resource") + + +@attr.s(auto_attribs=True) +class Resource: + """ + Attributes: + path (str): + resource_type (str): + is_oauth (bool): + workspace_id (Union[Unset, str]): + description (Union[Unset, str]): + value (Union[Unset, ResourceValue]): + extra_perms (Union[Unset, ResourceExtraPerms]): + """ + + path: str + resource_type: str + is_oauth: bool + workspace_id: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + value: Union[Unset, ResourceValue] = UNSET + extra_perms: Union[Unset, ResourceExtraPerms] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + resource_type = self.resource_type + is_oauth = self.is_oauth + workspace_id = self.workspace_id + description = self.description + value: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.value, Unset): + value = self.value.to_dict() + + extra_perms: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.extra_perms, Unset): + extra_perms = self.extra_perms.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "resource_type": resource_type, + "is_oauth": is_oauth, + } + ) + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if description is not UNSET: + field_dict["description"] = description + if value is not UNSET: + field_dict["value"] = value + if extra_perms is not UNSET: + field_dict["extra_perms"] = extra_perms + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + resource_type = d.pop("resource_type") + + is_oauth = d.pop("is_oauth") + + workspace_id = d.pop("workspace_id", UNSET) + + description = d.pop("description", UNSET) + + _value = d.pop("value", UNSET) + value: Union[Unset, ResourceValue] + if isinstance(_value, Unset): + value = UNSET + else: + value = ResourceValue.from_dict(_value) + + _extra_perms = d.pop("extra_perms", UNSET) + extra_perms: Union[Unset, ResourceExtraPerms] + if isinstance(_extra_perms, Unset): + extra_perms = UNSET + else: + extra_perms = ResourceExtraPerms.from_dict(_extra_perms) + + resource = cls( + path=path, + resource_type=resource_type, + is_oauth=is_oauth, + workspace_id=workspace_id, + description=description, + value=value, + extra_perms=extra_perms, + ) + + resource.additional_properties = d + return resource + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/resource_extra_perms.py b/python-client/windmill-api/windmill_api/models/resource_extra_perms.py new file mode 100644 index 0000000000..9f7eac3855 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/resource_extra_perms.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ResourceExtraPerms") + + +@attr.s(auto_attribs=True) +class ResourceExtraPerms: + """ """ + + additional_properties: Dict[str, bool] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + resource_extra_perms = cls() + + resource_extra_perms.additional_properties = d + return resource_extra_perms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> bool: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: bool) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/resource_type.py b/python-client/windmill-api/windmill_api/models/resource_type.py new file mode 100644 index 0000000000..1e965c022e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/resource_type.py @@ -0,0 +1,83 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ResourceType") + + +@attr.s(auto_attribs=True) +class ResourceType: + """ + Attributes: + name (str): + workspace_id (Union[Unset, str]): + schema (Union[Unset, Any]): + description (Union[Unset, str]): + """ + + name: str + workspace_id: Union[Unset, str] = UNSET + schema: Union[Unset, Any] = UNSET + description: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + workspace_id = self.workspace_id + schema = self.schema + description = self.description + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if schema is not UNSET: + field_dict["schema"] = schema + if description is not UNSET: + field_dict["description"] = description + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name") + + workspace_id = d.pop("workspace_id", UNSET) + + schema = d.pop("schema", UNSET) + + description = d.pop("description", UNSET) + + resource_type = cls( + name=name, + workspace_id=workspace_id, + schema=schema, + description=description, + ) + + resource_type.additional_properties = d + return resource_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/resource_value.py b/python-client/windmill-api/windmill_api/models/resource_value.py new file mode 100644 index 0000000000..3856cb4177 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/resource_value.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ResourceValue") + + +@attr.s(auto_attribs=True) +class ResourceValue: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + resource_value = cls() + + resource_value.additional_properties = d + return resource_value + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/resume_suspended_job_json_body.py b/python-client/windmill-api/windmill_api/models/resume_suspended_job_json_body.py new file mode 100644 index 0000000000..4ecb690449 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/resume_suspended_job_json_body.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ResumeSuspendedJobJsonBody") + + +@attr.s(auto_attribs=True) +class ResumeSuspendedJobJsonBody: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + resume_suspended_job_json_body = cls() + + resume_suspended_job_json_body.additional_properties = d + return resume_suspended_job_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/resume_suspended_job_payload.py b/python-client/windmill-api/windmill_api/models/resume_suspended_job_payload.py new file mode 100644 index 0000000000..a2fcc0a4f0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/resume_suspended_job_payload.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ResumeSuspendedJobPayload") + + +@attr.s(auto_attribs=True) +class ResumeSuspendedJobPayload: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + resume_suspended_job_payload = cls() + + resume_suspended_job_payload.additional_properties = d + return resume_suspended_job_payload + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/retry.py b/python-client/windmill-api/windmill_api/models/retry.py new file mode 100644 index 0000000000..9407edc7cd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/retry.py @@ -0,0 +1,82 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.retry_constant import RetryConstant +from ..models.retry_exponential import RetryExponential +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Retry") + + +@attr.s(auto_attribs=True) +class Retry: + """ + Attributes: + constant (Union[Unset, RetryConstant]): + exponential (Union[Unset, RetryExponential]): + """ + + constant: Union[Unset, RetryConstant] = UNSET + exponential: Union[Unset, RetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, RetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = RetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, RetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = RetryExponential.from_dict(_exponential) + + retry = cls( + constant=constant, + exponential=exponential, + ) + + retry.additional_properties = d + return retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/retry_constant.py b/python-client/windmill-api/windmill_api/models/retry_constant.py new file mode 100644 index 0000000000..3ef439aa93 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RetryConstant") + + +@attr.s(auto_attribs=True) +class RetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + retry_constant.additional_properties = d + return retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/retry_exponential.py b/python-client/windmill-api/windmill_api/models/retry_exponential.py new file mode 100644 index 0000000000..c1cce5d2c9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RetryExponential") + + +@attr.s(auto_attribs=True) +class RetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + retry_exponential.additional_properties = d + return retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_by_path_json_body.py b/python-client/windmill-api/windmill_api/models/run_flow_by_path_json_body.py new file mode 100644 index 0000000000..ae9b069235 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_by_path_json_body.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="RunFlowByPathJsonBody") + + +@attr.s(auto_attribs=True) +class RunFlowByPathJsonBody: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + run_flow_by_path_json_body = cls() + + run_flow_by_path_json_body.additional_properties = d + return run_flow_by_path_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body.py new file mode 100644 index 0000000000..a6d3d7fbb5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body.py @@ -0,0 +1,78 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.run_flow_preview_json_body_args import RunFlowPreviewJsonBodyArgs +from ..models.run_flow_preview_json_body_value import RunFlowPreviewJsonBodyValue +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunFlowPreviewJsonBody") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBody: + """ + Attributes: + value (RunFlowPreviewJsonBodyValue): + args (RunFlowPreviewJsonBodyArgs): + path (Union[Unset, str]): + """ + + value: RunFlowPreviewJsonBodyValue + args: RunFlowPreviewJsonBodyArgs + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + value = self.value.to_dict() + + args = self.args.to_dict() + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "value": value, + "args": args, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + value = RunFlowPreviewJsonBodyValue.from_dict(d.pop("value")) + + args = RunFlowPreviewJsonBodyArgs.from_dict(d.pop("args")) + + path = d.pop("path", UNSET) + + run_flow_preview_json_body = cls( + value=value, + args=args, + path=path, + ) + + run_flow_preview_json_body.additional_properties = d + return run_flow_preview_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_args.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_args.py new file mode 100644 index 0000000000..88a35d827a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_args.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyArgs") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyArgs: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + run_flow_preview_json_body_args = cls() + + run_flow_preview_json_body_args.additional_properties = d + return run_flow_preview_json_body_args + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value.py new file mode 100644 index 0000000000..b1df74e491 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value.py @@ -0,0 +1,95 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.run_flow_preview_json_body_value_failure_module import RunFlowPreviewJsonBodyValueFailureModule +from ..models.run_flow_preview_json_body_value_modules_item import RunFlowPreviewJsonBodyValueModulesItem +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValue") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValue: + """ + Attributes: + modules (List[RunFlowPreviewJsonBodyValueModulesItem]): + failure_module (Union[Unset, RunFlowPreviewJsonBodyValueFailureModule]): + same_worker (Union[Unset, bool]): + """ + + modules: List[RunFlowPreviewJsonBodyValueModulesItem] + failure_module: Union[Unset, RunFlowPreviewJsonBodyValueFailureModule] = UNSET + same_worker: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + modules = [] + for modules_item_data in self.modules: + modules_item = modules_item_data.to_dict() + + modules.append(modules_item) + + failure_module: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.failure_module, Unset): + failure_module = self.failure_module.to_dict() + + same_worker = self.same_worker + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "modules": modules, + } + ) + if failure_module is not UNSET: + field_dict["failure_module"] = failure_module + if same_worker is not UNSET: + field_dict["same_worker"] = same_worker + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + modules = [] + _modules = d.pop("modules") + for modules_item_data in _modules: + modules_item = RunFlowPreviewJsonBodyValueModulesItem.from_dict(modules_item_data) + + modules.append(modules_item) + + _failure_module = d.pop("failure_module", UNSET) + failure_module: Union[Unset, RunFlowPreviewJsonBodyValueFailureModule] + if isinstance(_failure_module, Unset): + failure_module = UNSET + else: + failure_module = RunFlowPreviewJsonBodyValueFailureModule.from_dict(_failure_module) + + same_worker = d.pop("same_worker", UNSET) + + run_flow_preview_json_body_value = cls( + modules=modules, + failure_module=failure_module, + same_worker=same_worker, + ) + + run_flow_preview_json_body_value.additional_properties = d + return run_flow_preview_json_body_value + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module.py new file mode 100644 index 0000000000..f243a55ebf --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module.py @@ -0,0 +1,252 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.run_flow_preview_json_body_value_failure_module_input_transforms import ( + RunFlowPreviewJsonBodyValueFailureModuleInputTransforms, +) +from ..models.run_flow_preview_json_body_value_failure_module_retry import RunFlowPreviewJsonBodyValueFailureModuleRetry +from ..models.run_flow_preview_json_body_value_failure_module_sleep_type_0 import ( + RunFlowPreviewJsonBodyValueFailureModuleSleepType0, +) +from ..models.run_flow_preview_json_body_value_failure_module_sleep_type_1 import ( + RunFlowPreviewJsonBodyValueFailureModuleSleepType1, +) +from ..models.run_flow_preview_json_body_value_failure_module_stop_after_if import ( + RunFlowPreviewJsonBodyValueFailureModuleStopAfterIf, +) +from ..models.run_flow_preview_json_body_value_failure_module_value_type_0 import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType0, +) +from ..models.run_flow_preview_json_body_value_failure_module_value_type_1 import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType1, +) +from ..models.run_flow_preview_json_body_value_failure_module_value_type_2 import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType2, +) +from ..models.run_flow_preview_json_body_value_failure_module_value_type_3 import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType3, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueFailureModule") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueFailureModule: + """ + Attributes: + input_transforms (RunFlowPreviewJsonBodyValueFailureModuleInputTransforms): + value (Union[RunFlowPreviewJsonBodyValueFailureModuleValueType0, + RunFlowPreviewJsonBodyValueFailureModuleValueType1, RunFlowPreviewJsonBodyValueFailureModuleValueType2, + RunFlowPreviewJsonBodyValueFailureModuleValueType3]): + stop_after_if (Union[Unset, RunFlowPreviewJsonBodyValueFailureModuleStopAfterIf]): + sleep (Union[RunFlowPreviewJsonBodyValueFailureModuleSleepType0, + RunFlowPreviewJsonBodyValueFailureModuleSleepType1, Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, RunFlowPreviewJsonBodyValueFailureModuleRetry]): + """ + + input_transforms: RunFlowPreviewJsonBodyValueFailureModuleInputTransforms + value: Union[ + RunFlowPreviewJsonBodyValueFailureModuleValueType0, + RunFlowPreviewJsonBodyValueFailureModuleValueType1, + RunFlowPreviewJsonBodyValueFailureModuleValueType2, + RunFlowPreviewJsonBodyValueFailureModuleValueType3, + ] + stop_after_if: Union[Unset, RunFlowPreviewJsonBodyValueFailureModuleStopAfterIf] = UNSET + sleep: Union[ + RunFlowPreviewJsonBodyValueFailureModuleSleepType0, RunFlowPreviewJsonBodyValueFailureModuleSleepType1, Unset + ] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, RunFlowPreviewJsonBodyValueFailureModuleRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, RunFlowPreviewJsonBodyValueFailureModuleValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, RunFlowPreviewJsonBodyValueFailureModuleValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, RunFlowPreviewJsonBodyValueFailureModuleValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, RunFlowPreviewJsonBodyValueFailureModuleSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = RunFlowPreviewJsonBodyValueFailureModuleInputTransforms.from_dict(d.pop("input_transforms")) + + def _parse_value( + data: object, + ) -> Union[ + RunFlowPreviewJsonBodyValueFailureModuleValueType0, + RunFlowPreviewJsonBodyValueFailureModuleValueType1, + RunFlowPreviewJsonBodyValueFailureModuleValueType2, + RunFlowPreviewJsonBodyValueFailureModuleValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = RunFlowPreviewJsonBodyValueFailureModuleValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = RunFlowPreviewJsonBodyValueFailureModuleValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = RunFlowPreviewJsonBodyValueFailureModuleValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = RunFlowPreviewJsonBodyValueFailureModuleValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, RunFlowPreviewJsonBodyValueFailureModuleStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = RunFlowPreviewJsonBodyValueFailureModuleStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[ + RunFlowPreviewJsonBodyValueFailureModuleSleepType0, + RunFlowPreviewJsonBodyValueFailureModuleSleepType1, + Unset, + ]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, RunFlowPreviewJsonBodyValueFailureModuleSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = RunFlowPreviewJsonBodyValueFailureModuleSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, RunFlowPreviewJsonBodyValueFailureModuleSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = RunFlowPreviewJsonBodyValueFailureModuleSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, RunFlowPreviewJsonBodyValueFailureModuleRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = RunFlowPreviewJsonBodyValueFailureModuleRetry.from_dict(_retry) + + run_flow_preview_json_body_value_failure_module = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + run_flow_preview_json_body_value_failure_module.additional_properties = d + return run_flow_preview_json_body_value_failure_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_input_transforms.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_input_transforms.py new file mode 100644 index 0000000000..034e25b6b6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_input_transforms.py @@ -0,0 +1,107 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_0 import ( + RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0, +) +from ..models.run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_1 import ( + RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueFailureModuleInputTransforms") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueFailureModuleInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0, + RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + run_flow_preview_json_body_value_failure_module_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0, + RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0.from_dict(data) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1.from_dict(data) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + run_flow_preview_json_body_value_failure_module_input_transforms.additional_properties = additional_properties + return run_flow_preview_json_body_value_failure_module_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0, + RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0, + RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..b84ee71cb8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_0.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_0_type import ( + RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_0.additional_properties = ( + d + ) + return run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..7dfbdde4f0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..efab490324 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_1.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_1_type import ( + RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_1.additional_properties = ( + d + ) + return run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..db34361e75 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class RunFlowPreviewJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_retry.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_retry.py new file mode 100644 index 0000000000..2467e4bf7d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_retry.py @@ -0,0 +1,86 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.run_flow_preview_json_body_value_failure_module_retry_constant import ( + RunFlowPreviewJsonBodyValueFailureModuleRetryConstant, +) +from ..models.run_flow_preview_json_body_value_failure_module_retry_exponential import ( + RunFlowPreviewJsonBodyValueFailureModuleRetryExponential, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueFailureModuleRetry") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueFailureModuleRetry: + """ + Attributes: + constant (Union[Unset, RunFlowPreviewJsonBodyValueFailureModuleRetryConstant]): + exponential (Union[Unset, RunFlowPreviewJsonBodyValueFailureModuleRetryExponential]): + """ + + constant: Union[Unset, RunFlowPreviewJsonBodyValueFailureModuleRetryConstant] = UNSET + exponential: Union[Unset, RunFlowPreviewJsonBodyValueFailureModuleRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, RunFlowPreviewJsonBodyValueFailureModuleRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = RunFlowPreviewJsonBodyValueFailureModuleRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, RunFlowPreviewJsonBodyValueFailureModuleRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = RunFlowPreviewJsonBodyValueFailureModuleRetryExponential.from_dict(_exponential) + + run_flow_preview_json_body_value_failure_module_retry = cls( + constant=constant, + exponential=exponential, + ) + + run_flow_preview_json_body_value_failure_module_retry.additional_properties = d + return run_flow_preview_json_body_value_failure_module_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_retry_constant.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_retry_constant.py new file mode 100644 index 0000000000..6da4e844da --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueFailureModuleRetryConstant") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueFailureModuleRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + run_flow_preview_json_body_value_failure_module_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + run_flow_preview_json_body_value_failure_module_retry_constant.additional_properties = d + return run_flow_preview_json_body_value_failure_module_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_retry_exponential.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_retry_exponential.py new file mode 100644 index 0000000000..081f3c9553 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueFailureModuleRetryExponential") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueFailureModuleRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + run_flow_preview_json_body_value_failure_module_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + run_flow_preview_json_body_value_failure_module_retry_exponential.additional_properties = d + return run_flow_preview_json_body_value_failure_module_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_sleep_type_0.py new file mode 100644 index 0000000000..f102f7572a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_sleep_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.run_flow_preview_json_body_value_failure_module_sleep_type_0_type import ( + RunFlowPreviewJsonBodyValueFailureModuleSleepType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueFailureModuleSleepType0") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueFailureModuleSleepType0: + """ + Attributes: + type (RunFlowPreviewJsonBodyValueFailureModuleSleepType0Type): + value (Union[Unset, Any]): + """ + + type: RunFlowPreviewJsonBodyValueFailureModuleSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = RunFlowPreviewJsonBodyValueFailureModuleSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + run_flow_preview_json_body_value_failure_module_sleep_type_0 = cls( + type=type, + value=value, + ) + + run_flow_preview_json_body_value_failure_module_sleep_type_0.additional_properties = d + return run_flow_preview_json_body_value_failure_module_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_sleep_type_0_type.py new file mode 100644 index 0000000000..025facccee --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class RunFlowPreviewJsonBodyValueFailureModuleSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_sleep_type_1.py new file mode 100644 index 0000000000..8274679128 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_sleep_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.run_flow_preview_json_body_value_failure_module_sleep_type_1_type import ( + RunFlowPreviewJsonBodyValueFailureModuleSleepType1Type, +) + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueFailureModuleSleepType1") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueFailureModuleSleepType1: + """ + Attributes: + expr (str): + type (RunFlowPreviewJsonBodyValueFailureModuleSleepType1Type): + """ + + expr: str + type: RunFlowPreviewJsonBodyValueFailureModuleSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = RunFlowPreviewJsonBodyValueFailureModuleSleepType1Type(d.pop("type")) + + run_flow_preview_json_body_value_failure_module_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + run_flow_preview_json_body_value_failure_module_sleep_type_1.additional_properties = d + return run_flow_preview_json_body_value_failure_module_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_sleep_type_1_type.py new file mode 100644 index 0000000000..4ed9ec0efb --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class RunFlowPreviewJsonBodyValueFailureModuleSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_stop_after_if.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_stop_after_if.py new file mode 100644 index 0000000000..bd6b0a53cc --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueFailureModuleStopAfterIf") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueFailureModuleStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + run_flow_preview_json_body_value_failure_module_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + run_flow_preview_json_body_value_failure_module_stop_after_if.additional_properties = d + return run_flow_preview_json_body_value_failure_module_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_0.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_0.py new file mode 100644 index 0000000000..bd36f888bf --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.run_flow_preview_json_body_value_failure_module_value_type_0_language import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueFailureModuleValueType0") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueFailureModuleValueType0: + """ + Attributes: + content (str): + language (RunFlowPreviewJsonBodyValueFailureModuleValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: RunFlowPreviewJsonBodyValueFailureModuleValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = RunFlowPreviewJsonBodyValueFailureModuleValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + run_flow_preview_json_body_value_failure_module_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + run_flow_preview_json_body_value_failure_module_value_type_0.additional_properties = d + return run_flow_preview_json_body_value_failure_module_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_0_language.py new file mode 100644 index 0000000000..362f07a62e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class RunFlowPreviewJsonBodyValueFailureModuleValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_1.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_1.py new file mode 100644 index 0000000000..d3533294c0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.run_flow_preview_json_body_value_failure_module_value_type_1_type import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType1Type, +) + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueFailureModuleValueType1") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueFailureModuleValueType1: + """ + Attributes: + path (str): + type (RunFlowPreviewJsonBodyValueFailureModuleValueType1Type): + """ + + path: str + type: RunFlowPreviewJsonBodyValueFailureModuleValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = RunFlowPreviewJsonBodyValueFailureModuleValueType1Type(d.pop("type")) + + run_flow_preview_json_body_value_failure_module_value_type_1 = cls( + path=path, + type=type, + ) + + run_flow_preview_json_body_value_failure_module_value_type_1.additional_properties = d + return run_flow_preview_json_body_value_failure_module_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_1_type.py new file mode 100644 index 0000000000..182a321457 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class RunFlowPreviewJsonBodyValueFailureModuleValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2.py new file mode 100644 index 0000000000..02b640a20c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2.py @@ -0,0 +1,112 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_0 import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType0, +) +from ..models.run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_1 import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType1, +) +from ..models.run_flow_preview_json_body_value_failure_module_value_type_2_type import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType2Type, +) + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueFailureModuleValueType2") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueFailureModuleValueType2: + """ + Attributes: + iterator (Union[RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType0, + RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType1]): + skip_failures (bool): + type (RunFlowPreviewJsonBodyValueFailureModuleValueType2Type): + """ + + iterator: Union[ + RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType0, + RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType1, + ] + skip_failures: bool + type: RunFlowPreviewJsonBodyValueFailureModuleValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType0, + RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = RunFlowPreviewJsonBodyValueFailureModuleValueType2Type(d.pop("type")) + + run_flow_preview_json_body_value_failure_module_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + run_flow_preview_json_body_value_failure_module_value_type_2.additional_properties = d + return run_flow_preview_json_body_value_failure_module_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..e9a10b8d48 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_0_type import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType0: + """ + Attributes: + type (RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_0.additional_properties = d + return run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..735928eaed --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..dd9d0cd5de --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_1_type import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType1: + """ + Attributes: + expr (str): + type (RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType1Type): + """ + + expr: str + type: RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType1Type(d.pop("type")) + + run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_1.additional_properties = d + return run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..b15f85add2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class RunFlowPreviewJsonBodyValueFailureModuleValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2_type.py new file mode 100644 index 0000000000..fae6d6d7ba --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class RunFlowPreviewJsonBodyValueFailureModuleValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_3.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_3.py new file mode 100644 index 0000000000..26844cfda9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_3.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.run_flow_preview_json_body_value_failure_module_value_type_3_type import ( + RunFlowPreviewJsonBodyValueFailureModuleValueType3Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueFailureModuleValueType3") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueFailureModuleValueType3: + """ + Attributes: + type (RunFlowPreviewJsonBodyValueFailureModuleValueType3Type): + path (Union[Unset, str]): + """ + + type: RunFlowPreviewJsonBodyValueFailureModuleValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = RunFlowPreviewJsonBodyValueFailureModuleValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + run_flow_preview_json_body_value_failure_module_value_type_3 = cls( + type=type, + path=path, + ) + + run_flow_preview_json_body_value_failure_module_value_type_3.additional_properties = d + return run_flow_preview_json_body_value_failure_module_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_3_type.py new file mode 100644 index 0000000000..64666fa88c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_failure_module_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class RunFlowPreviewJsonBodyValueFailureModuleValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item.py new file mode 100644 index 0000000000..b1a9d5eb71 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item.py @@ -0,0 +1,249 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.run_flow_preview_json_body_value_modules_item_input_transforms import ( + RunFlowPreviewJsonBodyValueModulesItemInputTransforms, +) +from ..models.run_flow_preview_json_body_value_modules_item_retry import RunFlowPreviewJsonBodyValueModulesItemRetry +from ..models.run_flow_preview_json_body_value_modules_item_sleep_type_0 import ( + RunFlowPreviewJsonBodyValueModulesItemSleepType0, +) +from ..models.run_flow_preview_json_body_value_modules_item_sleep_type_1 import ( + RunFlowPreviewJsonBodyValueModulesItemSleepType1, +) +from ..models.run_flow_preview_json_body_value_modules_item_stop_after_if import ( + RunFlowPreviewJsonBodyValueModulesItemStopAfterIf, +) +from ..models.run_flow_preview_json_body_value_modules_item_value_type_0 import ( + RunFlowPreviewJsonBodyValueModulesItemValueType0, +) +from ..models.run_flow_preview_json_body_value_modules_item_value_type_1 import ( + RunFlowPreviewJsonBodyValueModulesItemValueType1, +) +from ..models.run_flow_preview_json_body_value_modules_item_value_type_2 import ( + RunFlowPreviewJsonBodyValueModulesItemValueType2, +) +from ..models.run_flow_preview_json_body_value_modules_item_value_type_3 import ( + RunFlowPreviewJsonBodyValueModulesItemValueType3, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueModulesItem") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueModulesItem: + """ + Attributes: + input_transforms (RunFlowPreviewJsonBodyValueModulesItemInputTransforms): + value (Union[RunFlowPreviewJsonBodyValueModulesItemValueType0, RunFlowPreviewJsonBodyValueModulesItemValueType1, + RunFlowPreviewJsonBodyValueModulesItemValueType2, RunFlowPreviewJsonBodyValueModulesItemValueType3]): + stop_after_if (Union[Unset, RunFlowPreviewJsonBodyValueModulesItemStopAfterIf]): + sleep (Union[RunFlowPreviewJsonBodyValueModulesItemSleepType0, RunFlowPreviewJsonBodyValueModulesItemSleepType1, + Unset]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, RunFlowPreviewJsonBodyValueModulesItemRetry]): + """ + + input_transforms: RunFlowPreviewJsonBodyValueModulesItemInputTransforms + value: Union[ + RunFlowPreviewJsonBodyValueModulesItemValueType0, + RunFlowPreviewJsonBodyValueModulesItemValueType1, + RunFlowPreviewJsonBodyValueModulesItemValueType2, + RunFlowPreviewJsonBodyValueModulesItemValueType3, + ] + stop_after_if: Union[Unset, RunFlowPreviewJsonBodyValueModulesItemStopAfterIf] = UNSET + sleep: Union[ + RunFlowPreviewJsonBodyValueModulesItemSleepType0, RunFlowPreviewJsonBodyValueModulesItemSleepType1, Unset + ] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, RunFlowPreviewJsonBodyValueModulesItemRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, RunFlowPreviewJsonBodyValueModulesItemValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, RunFlowPreviewJsonBodyValueModulesItemValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, RunFlowPreviewJsonBodyValueModulesItemValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, RunFlowPreviewJsonBodyValueModulesItemSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = RunFlowPreviewJsonBodyValueModulesItemInputTransforms.from_dict(d.pop("input_transforms")) + + def _parse_value( + data: object, + ) -> Union[ + RunFlowPreviewJsonBodyValueModulesItemValueType0, + RunFlowPreviewJsonBodyValueModulesItemValueType1, + RunFlowPreviewJsonBodyValueModulesItemValueType2, + RunFlowPreviewJsonBodyValueModulesItemValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = RunFlowPreviewJsonBodyValueModulesItemValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = RunFlowPreviewJsonBodyValueModulesItemValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = RunFlowPreviewJsonBodyValueModulesItemValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = RunFlowPreviewJsonBodyValueModulesItemValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, RunFlowPreviewJsonBodyValueModulesItemStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = RunFlowPreviewJsonBodyValueModulesItemStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[ + RunFlowPreviewJsonBodyValueModulesItemSleepType0, RunFlowPreviewJsonBodyValueModulesItemSleepType1, Unset + ]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, RunFlowPreviewJsonBodyValueModulesItemSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = RunFlowPreviewJsonBodyValueModulesItemSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, RunFlowPreviewJsonBodyValueModulesItemSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = RunFlowPreviewJsonBodyValueModulesItemSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, RunFlowPreviewJsonBodyValueModulesItemRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = RunFlowPreviewJsonBodyValueModulesItemRetry.from_dict(_retry) + + run_flow_preview_json_body_value_modules_item = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + run_flow_preview_json_body_value_modules_item.additional_properties = d + return run_flow_preview_json_body_value_modules_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_input_transforms.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_input_transforms.py new file mode 100644 index 0000000000..7699ad5add --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_input_transforms.py @@ -0,0 +1,107 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_0 import ( + RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0, +) +from ..models.run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_1 import ( + RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueModulesItemInputTransforms") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueModulesItemInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0, + RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + run_flow_preview_json_body_value_modules_item_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0, + RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0.from_dict(data) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1.from_dict(data) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + run_flow_preview_json_body_value_modules_item_input_transforms.additional_properties = additional_properties + return run_flow_preview_json_body_value_modules_item_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0, + RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0, + RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..02ecfeead5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_0.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_0_type import ( + RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_0.additional_properties = ( + d + ) + return run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..9c59c6015a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..1f5b0f90c2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_1.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_1_type import ( + RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_1.additional_properties = ( + d + ) + return run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..27130e9a5e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class RunFlowPreviewJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_retry.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_retry.py new file mode 100644 index 0000000000..01d8dbe5f0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_retry.py @@ -0,0 +1,86 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.run_flow_preview_json_body_value_modules_item_retry_constant import ( + RunFlowPreviewJsonBodyValueModulesItemRetryConstant, +) +from ..models.run_flow_preview_json_body_value_modules_item_retry_exponential import ( + RunFlowPreviewJsonBodyValueModulesItemRetryExponential, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueModulesItemRetry") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueModulesItemRetry: + """ + Attributes: + constant (Union[Unset, RunFlowPreviewJsonBodyValueModulesItemRetryConstant]): + exponential (Union[Unset, RunFlowPreviewJsonBodyValueModulesItemRetryExponential]): + """ + + constant: Union[Unset, RunFlowPreviewJsonBodyValueModulesItemRetryConstant] = UNSET + exponential: Union[Unset, RunFlowPreviewJsonBodyValueModulesItemRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, RunFlowPreviewJsonBodyValueModulesItemRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = RunFlowPreviewJsonBodyValueModulesItemRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, RunFlowPreviewJsonBodyValueModulesItemRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = RunFlowPreviewJsonBodyValueModulesItemRetryExponential.from_dict(_exponential) + + run_flow_preview_json_body_value_modules_item_retry = cls( + constant=constant, + exponential=exponential, + ) + + run_flow_preview_json_body_value_modules_item_retry.additional_properties = d + return run_flow_preview_json_body_value_modules_item_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_retry_constant.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_retry_constant.py new file mode 100644 index 0000000000..ae5e57a5bc --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueModulesItemRetryConstant") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueModulesItemRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + run_flow_preview_json_body_value_modules_item_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + run_flow_preview_json_body_value_modules_item_retry_constant.additional_properties = d + return run_flow_preview_json_body_value_modules_item_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_retry_exponential.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_retry_exponential.py new file mode 100644 index 0000000000..75c08af97b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueModulesItemRetryExponential") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueModulesItemRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + run_flow_preview_json_body_value_modules_item_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + run_flow_preview_json_body_value_modules_item_retry_exponential.additional_properties = d + return run_flow_preview_json_body_value_modules_item_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_sleep_type_0.py new file mode 100644 index 0000000000..f78a98d27b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_sleep_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.run_flow_preview_json_body_value_modules_item_sleep_type_0_type import ( + RunFlowPreviewJsonBodyValueModulesItemSleepType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueModulesItemSleepType0") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueModulesItemSleepType0: + """ + Attributes: + type (RunFlowPreviewJsonBodyValueModulesItemSleepType0Type): + value (Union[Unset, Any]): + """ + + type: RunFlowPreviewJsonBodyValueModulesItemSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = RunFlowPreviewJsonBodyValueModulesItemSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + run_flow_preview_json_body_value_modules_item_sleep_type_0 = cls( + type=type, + value=value, + ) + + run_flow_preview_json_body_value_modules_item_sleep_type_0.additional_properties = d + return run_flow_preview_json_body_value_modules_item_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_sleep_type_0_type.py new file mode 100644 index 0000000000..a9cee7f31f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class RunFlowPreviewJsonBodyValueModulesItemSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_sleep_type_1.py new file mode 100644 index 0000000000..239bf55b2b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_sleep_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.run_flow_preview_json_body_value_modules_item_sleep_type_1_type import ( + RunFlowPreviewJsonBodyValueModulesItemSleepType1Type, +) + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueModulesItemSleepType1") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueModulesItemSleepType1: + """ + Attributes: + expr (str): + type (RunFlowPreviewJsonBodyValueModulesItemSleepType1Type): + """ + + expr: str + type: RunFlowPreviewJsonBodyValueModulesItemSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = RunFlowPreviewJsonBodyValueModulesItemSleepType1Type(d.pop("type")) + + run_flow_preview_json_body_value_modules_item_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + run_flow_preview_json_body_value_modules_item_sleep_type_1.additional_properties = d + return run_flow_preview_json_body_value_modules_item_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_sleep_type_1_type.py new file mode 100644 index 0000000000..f2f6c99d1c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class RunFlowPreviewJsonBodyValueModulesItemSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_stop_after_if.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_stop_after_if.py new file mode 100644 index 0000000000..c3a728f7b0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueModulesItemStopAfterIf") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueModulesItemStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + run_flow_preview_json_body_value_modules_item_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + run_flow_preview_json_body_value_modules_item_stop_after_if.additional_properties = d + return run_flow_preview_json_body_value_modules_item_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_0.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_0.py new file mode 100644 index 0000000000..ccfabcb823 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.run_flow_preview_json_body_value_modules_item_value_type_0_language import ( + RunFlowPreviewJsonBodyValueModulesItemValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueModulesItemValueType0") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueModulesItemValueType0: + """ + Attributes: + content (str): + language (RunFlowPreviewJsonBodyValueModulesItemValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: RunFlowPreviewJsonBodyValueModulesItemValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = RunFlowPreviewJsonBodyValueModulesItemValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + run_flow_preview_json_body_value_modules_item_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + run_flow_preview_json_body_value_modules_item_value_type_0.additional_properties = d + return run_flow_preview_json_body_value_modules_item_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_0_language.py new file mode 100644 index 0000000000..68da8a76d1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class RunFlowPreviewJsonBodyValueModulesItemValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_1.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_1.py new file mode 100644 index 0000000000..176d1094a3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.run_flow_preview_json_body_value_modules_item_value_type_1_type import ( + RunFlowPreviewJsonBodyValueModulesItemValueType1Type, +) + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueModulesItemValueType1") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueModulesItemValueType1: + """ + Attributes: + path (str): + type (RunFlowPreviewJsonBodyValueModulesItemValueType1Type): + """ + + path: str + type: RunFlowPreviewJsonBodyValueModulesItemValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = RunFlowPreviewJsonBodyValueModulesItemValueType1Type(d.pop("type")) + + run_flow_preview_json_body_value_modules_item_value_type_1 = cls( + path=path, + type=type, + ) + + run_flow_preview_json_body_value_modules_item_value_type_1.additional_properties = d + return run_flow_preview_json_body_value_modules_item_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_1_type.py new file mode 100644 index 0000000000..da39e144fa --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class RunFlowPreviewJsonBodyValueModulesItemValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2.py new file mode 100644 index 0000000000..2a7a2935b6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2.py @@ -0,0 +1,112 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_0 import ( + RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType0, +) +from ..models.run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_1 import ( + RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType1, +) +from ..models.run_flow_preview_json_body_value_modules_item_value_type_2_type import ( + RunFlowPreviewJsonBodyValueModulesItemValueType2Type, +) + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueModulesItemValueType2") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueModulesItemValueType2: + """ + Attributes: + iterator (Union[RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType0, + RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType1]): + skip_failures (bool): + type (RunFlowPreviewJsonBodyValueModulesItemValueType2Type): + """ + + iterator: Union[ + RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType0, + RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType1, + ] + skip_failures: bool + type: RunFlowPreviewJsonBodyValueModulesItemValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType0, + RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = RunFlowPreviewJsonBodyValueModulesItemValueType2Type(d.pop("type")) + + run_flow_preview_json_body_value_modules_item_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + run_flow_preview_json_body_value_modules_item_value_type_2.additional_properties = d + return run_flow_preview_json_body_value_modules_item_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..0e8ff23b4e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_0_type import ( + RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType0: + """ + Attributes: + type (RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_0.additional_properties = d + return run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..7d2b8f7429 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..1fb570c53f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_1_type import ( + RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType1: + """ + Attributes: + expr (str): + type (RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType1Type): + """ + + expr: str + type: RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType1Type(d.pop("type")) + + run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_1.additional_properties = d + return run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..9ee391a442 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class RunFlowPreviewJsonBodyValueModulesItemValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2_type.py new file mode 100644 index 0000000000..b2502c148e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class RunFlowPreviewJsonBodyValueModulesItemValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_3.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_3.py new file mode 100644 index 0000000000..8c9d1b3aa3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_3.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.run_flow_preview_json_body_value_modules_item_value_type_3_type import ( + RunFlowPreviewJsonBodyValueModulesItemValueType3Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunFlowPreviewJsonBodyValueModulesItemValueType3") + + +@attr.s(auto_attribs=True) +class RunFlowPreviewJsonBodyValueModulesItemValueType3: + """ + Attributes: + type (RunFlowPreviewJsonBodyValueModulesItemValueType3Type): + path (Union[Unset, str]): + """ + + type: RunFlowPreviewJsonBodyValueModulesItemValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = RunFlowPreviewJsonBodyValueModulesItemValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + run_flow_preview_json_body_value_modules_item_value_type_3 = cls( + type=type, + path=path, + ) + + run_flow_preview_json_body_value_modules_item_value_type_3.additional_properties = d + return run_flow_preview_json_body_value_modules_item_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_3_type.py new file mode 100644 index 0000000000..223afdd4dc --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_flow_preview_json_body_value_modules_item_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class RunFlowPreviewJsonBodyValueModulesItemValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/run_script_by_hash_json_body.py b/python-client/windmill-api/windmill_api/models/run_script_by_hash_json_body.py new file mode 100644 index 0000000000..66928eee11 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_script_by_hash_json_body.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="RunScriptByHashJsonBody") + + +@attr.s(auto_attribs=True) +class RunScriptByHashJsonBody: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + run_script_by_hash_json_body = cls() + + run_script_by_hash_json_body.additional_properties = d + return run_script_by_hash_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_script_by_path_json_body.py b/python-client/windmill-api/windmill_api/models/run_script_by_path_json_body.py new file mode 100644 index 0000000000..c4527e611f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_script_by_path_json_body.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="RunScriptByPathJsonBody") + + +@attr.s(auto_attribs=True) +class RunScriptByPathJsonBody: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + run_script_by_path_json_body = cls() + + run_script_by_path_json_body.additional_properties = d + return run_script_by_path_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_script_preview_json_body.py b/python-client/windmill-api/windmill_api/models/run_script_preview_json_body.py new file mode 100644 index 0000000000..39f78c3828 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_script_preview_json_body.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.run_script_preview_json_body_args import RunScriptPreviewJsonBodyArgs +from ..models.run_script_preview_json_body_language import RunScriptPreviewJsonBodyLanguage +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunScriptPreviewJsonBody") + + +@attr.s(auto_attribs=True) +class RunScriptPreviewJsonBody: + """ + Attributes: + content (str): + args (RunScriptPreviewJsonBodyArgs): + language (RunScriptPreviewJsonBodyLanguage): + path (Union[Unset, str]): + """ + + content: str + args: RunScriptPreviewJsonBodyArgs + language: RunScriptPreviewJsonBodyLanguage + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + args = self.args.to_dict() + + language = self.language.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "args": args, + "language": language, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + args = RunScriptPreviewJsonBodyArgs.from_dict(d.pop("args")) + + language = RunScriptPreviewJsonBodyLanguage(d.pop("language")) + + path = d.pop("path", UNSET) + + run_script_preview_json_body = cls( + content=content, + args=args, + language=language, + path=path, + ) + + run_script_preview_json_body.additional_properties = d + return run_script_preview_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_script_preview_json_body_args.py b/python-client/windmill-api/windmill_api/models/run_script_preview_json_body_args.py new file mode 100644 index 0000000000..5abc8f1fc6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_script_preview_json_body_args.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="RunScriptPreviewJsonBodyArgs") + + +@attr.s(auto_attribs=True) +class RunScriptPreviewJsonBodyArgs: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + run_script_preview_json_body_args = cls() + + run_script_preview_json_body_args.additional_properties = d + return run_script_preview_json_body_args + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/run_script_preview_json_body_language.py b/python-client/windmill-api/windmill_api/models/run_script_preview_json_body_language.py new file mode 100644 index 0000000000..bfe277ff0c --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_script_preview_json_body_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class RunScriptPreviewJsonBodyLanguage(str, Enum): + PYTHON3 = "python3" + DENO = "deno" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/run_wait_result_script_by_path_json_body.py b/python-client/windmill-api/windmill_api/models/run_wait_result_script_by_path_json_body.py new file mode 100644 index 0000000000..e823d60729 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/run_wait_result_script_by_path_json_body.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="RunWaitResultScriptByPathJsonBody") + + +@attr.s(auto_attribs=True) +class RunWaitResultScriptByPathJsonBody: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + run_wait_result_script_by_path_json_body = cls() + + run_wait_result_script_by_path_json_body.additional_properties = d + return run_wait_result_script_by_path_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/schedule.py b/python-client/windmill-api/windmill_api/models/schedule.py new file mode 100644 index 0000000000..f6f98de7c3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/schedule.py @@ -0,0 +1,136 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.schedule_args import ScheduleArgs +from ..models.schedule_extra_perms import ScheduleExtraPerms +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Schedule") + + +@attr.s(auto_attribs=True) +class Schedule: + """ + Attributes: + path (str): + edited_by (str): + edited_at (datetime.datetime): + schedule (str): + offset (int): + enabled (bool): + script_path (str): + is_flow (bool): + extra_perms (ScheduleExtraPerms): + args (Union[Unset, ScheduleArgs]): + """ + + path: str + edited_by: str + edited_at: datetime.datetime + schedule: str + offset: int + enabled: bool + script_path: str + is_flow: bool + extra_perms: ScheduleExtraPerms + args: Union[Unset, ScheduleArgs] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + edited_by = self.edited_by + edited_at = self.edited_at.isoformat() + + schedule = self.schedule + offset = self.offset + enabled = self.enabled + script_path = self.script_path + is_flow = self.is_flow + extra_perms = self.extra_perms.to_dict() + + args: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.args, Unset): + args = self.args.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "edited_by": edited_by, + "edited_at": edited_at, + "schedule": schedule, + "offset_": offset, + "enabled": enabled, + "script_path": script_path, + "is_flow": is_flow, + "extra_perms": extra_perms, + } + ) + if args is not UNSET: + field_dict["args"] = args + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + edited_by = d.pop("edited_by") + + edited_at = isoparse(d.pop("edited_at")) + + schedule = d.pop("schedule") + + offset = d.pop("offset_") + + enabled = d.pop("enabled") + + script_path = d.pop("script_path") + + is_flow = d.pop("is_flow") + + extra_perms = ScheduleExtraPerms.from_dict(d.pop("extra_perms")) + + _args = d.pop("args", UNSET) + args: Union[Unset, ScheduleArgs] + if isinstance(_args, Unset): + args = UNSET + else: + args = ScheduleArgs.from_dict(_args) + + schedule = cls( + path=path, + edited_by=edited_by, + edited_at=edited_at, + schedule=schedule, + offset=offset, + enabled=enabled, + script_path=script_path, + is_flow=is_flow, + extra_perms=extra_perms, + args=args, + ) + + schedule.additional_properties = d + return schedule + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/schedule_args.py b/python-client/windmill-api/windmill_api/models/schedule_args.py new file mode 100644 index 0000000000..ca0d128ce5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/schedule_args.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ScheduleArgs") + + +@attr.s(auto_attribs=True) +class ScheduleArgs: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + schedule_args = cls() + + schedule_args.additional_properties = d + return schedule_args + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/schedule_extra_perms.py b/python-client/windmill-api/windmill_api/models/schedule_extra_perms.py new file mode 100644 index 0000000000..9ae6a588b0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/schedule_extra_perms.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ScheduleExtraPerms") + + +@attr.s(auto_attribs=True) +class ScheduleExtraPerms: + """ """ + + additional_properties: Dict[str, bool] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + schedule_extra_perms = cls() + + schedule_extra_perms.additional_properties = d + return schedule_extra_perms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> bool: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: bool) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/script.py b/python-client/windmill-api/windmill_api/models/script.py new file mode 100644 index 0000000000..948bcfebf7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/script.py @@ -0,0 +1,206 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr +from dateutil.parser import isoparse + +from ..models.script_extra_perms import ScriptExtraPerms +from ..models.script_kind import ScriptKind +from ..models.script_language import ScriptLanguage +from ..models.script_schema import ScriptSchema +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Script") + + +@attr.s(auto_attribs=True) +class Script: + """ + Attributes: + hash_ (str): + path (str): + summary (str): + content (str): + created_by (str): + created_at (datetime.datetime): + archived (bool): + deleted (bool): + is_template (bool): + extra_perms (ScriptExtraPerms): + language (ScriptLanguage): + kind (ScriptKind): + workspace_id (Union[Unset, str]): + parent_hashes (Union[Unset, List[str]]): The first element is the direct parent of the script, the second is the + parent of the first, etc + description (Union[Unset, str]): + schema (Union[Unset, ScriptSchema]): + lock (Union[Unset, str]): + lock_error_logs (Union[Unset, str]): + """ + + hash_: str + path: str + summary: str + content: str + created_by: str + created_at: datetime.datetime + archived: bool + deleted: bool + is_template: bool + extra_perms: ScriptExtraPerms + language: ScriptLanguage + kind: ScriptKind + workspace_id: Union[Unset, str] = UNSET + parent_hashes: Union[Unset, List[str]] = UNSET + description: Union[Unset, str] = UNSET + schema: Union[Unset, ScriptSchema] = UNSET + lock: Union[Unset, str] = UNSET + lock_error_logs: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + hash_ = self.hash_ + path = self.path + summary = self.summary + content = self.content + created_by = self.created_by + created_at = self.created_at.isoformat() + + archived = self.archived + deleted = self.deleted + is_template = self.is_template + extra_perms = self.extra_perms.to_dict() + + language = self.language.value + + kind = self.kind.value + + workspace_id = self.workspace_id + parent_hashes: Union[Unset, List[str]] = UNSET + if not isinstance(self.parent_hashes, Unset): + parent_hashes = self.parent_hashes + + description = self.description + schema: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.schema, Unset): + schema = self.schema.to_dict() + + lock = self.lock + lock_error_logs = self.lock_error_logs + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "hash": hash_, + "path": path, + "summary": summary, + "content": content, + "created_by": created_by, + "created_at": created_at, + "archived": archived, + "deleted": deleted, + "is_template": is_template, + "extra_perms": extra_perms, + "language": language, + "kind": kind, + } + ) + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if parent_hashes is not UNSET: + field_dict["parent_hashes"] = parent_hashes + if description is not UNSET: + field_dict["description"] = description + if schema is not UNSET: + field_dict["schema"] = schema + if lock is not UNSET: + field_dict["lock"] = lock + if lock_error_logs is not UNSET: + field_dict["lock_error_logs"] = lock_error_logs + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + hash_ = d.pop("hash") + + path = d.pop("path") + + summary = d.pop("summary") + + content = d.pop("content") + + created_by = d.pop("created_by") + + created_at = isoparse(d.pop("created_at")) + + archived = d.pop("archived") + + deleted = d.pop("deleted") + + is_template = d.pop("is_template") + + extra_perms = ScriptExtraPerms.from_dict(d.pop("extra_perms")) + + language = ScriptLanguage(d.pop("language")) + + kind = ScriptKind(d.pop("kind")) + + workspace_id = d.pop("workspace_id", UNSET) + + parent_hashes = cast(List[str], d.pop("parent_hashes", UNSET)) + + description = d.pop("description", UNSET) + + _schema = d.pop("schema", UNSET) + schema: Union[Unset, ScriptSchema] + if isinstance(_schema, Unset): + schema = UNSET + else: + schema = ScriptSchema.from_dict(_schema) + + lock = d.pop("lock", UNSET) + + lock_error_logs = d.pop("lock_error_logs", UNSET) + + script = cls( + hash_=hash_, + path=path, + summary=summary, + content=content, + created_by=created_by, + created_at=created_at, + archived=archived, + deleted=deleted, + is_template=is_template, + extra_perms=extra_perms, + language=language, + kind=kind, + workspace_id=workspace_id, + parent_hashes=parent_hashes, + description=description, + schema=schema, + lock=lock, + lock_error_logs=lock_error_logs, + ) + + script.additional_properties = d + return script + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/script_args.py b/python-client/windmill-api/windmill_api/models/script_args.py new file mode 100644 index 0000000000..18c6d5747b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/script_args.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ScriptArgs") + + +@attr.s(auto_attribs=True) +class ScriptArgs: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + script_args = cls() + + script_args.additional_properties = d + return script_args + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/script_extra_perms.py b/python-client/windmill-api/windmill_api/models/script_extra_perms.py new file mode 100644 index 0000000000..53f88dd7c6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/script_extra_perms.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ScriptExtraPerms") + + +@attr.s(auto_attribs=True) +class ScriptExtraPerms: + """ """ + + additional_properties: Dict[str, bool] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + script_extra_perms = cls() + + script_extra_perms.additional_properties = d + return script_extra_perms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> bool: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: bool) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/script_kind.py b/python-client/windmill-api/windmill_api/models/script_kind.py new file mode 100644 index 0000000000..7b0852491b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/script_kind.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class ScriptKind(str, Enum): + SCRIPT = "script" + FAILURE = "failure" + TRIGGER = "trigger" + COMMAND = "command" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/script_language.py b/python-client/windmill-api/windmill_api/models/script_language.py new file mode 100644 index 0000000000..b7a1dd1d49 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/script_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ScriptLanguage(str, Enum): + PYTHON3 = "python3" + DENO = "deno" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/script_schema.py b/python-client/windmill-api/windmill_api/models/script_schema.py new file mode 100644 index 0000000000..f7d77f8291 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/script_schema.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="ScriptSchema") + + +@attr.s(auto_attribs=True) +class ScriptSchema: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + script_schema = cls() + + script_schema.additional_properties = d + return script_schema + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/set_password_json_body.py b/python-client/windmill-api/windmill_api/models/set_password_json_body.py new file mode 100644 index 0000000000..0b336b4790 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/set_password_json_body.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="SetPasswordJsonBody") + + +@attr.s(auto_attribs=True) +class SetPasswordJsonBody: + """ + Attributes: + password (str): + """ + + password: str + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + password = self.password + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "password": password, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + password = d.pop("password") + + set_password_json_body = cls( + password=password, + ) + + set_password_json_body.additional_properties = d + return set_password_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/set_schedule_enabled_json_body.py b/python-client/windmill-api/windmill_api/models/set_schedule_enabled_json_body.py new file mode 100644 index 0000000000..bd3b01ee48 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/set_schedule_enabled_json_body.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="SetScheduleEnabledJsonBody") + + +@attr.s(auto_attribs=True) +class SetScheduleEnabledJsonBody: + """ + Attributes: + enabled (bool): + """ + + enabled: bool + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + enabled = self.enabled + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "enabled": enabled, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + enabled = d.pop("enabled") + + set_schedule_enabled_json_body = cls( + enabled=enabled, + ) + + set_schedule_enabled_json_body.additional_properties = d + return set_schedule_enabled_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/set_workspace_slack_json_body.py b/python-client/windmill-api/windmill_api/models/set_workspace_slack_json_body.py new file mode 100644 index 0000000000..4d25708a55 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/set_workspace_slack_json_body.py @@ -0,0 +1,80 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.set_workspace_slack_json_body_bot import SetWorkspaceSlackJsonBodyBot + +T = TypeVar("T", bound="SetWorkspaceSlackJsonBody") + + +@attr.s(auto_attribs=True) +class SetWorkspaceSlackJsonBody: + """ + Attributes: + access_token (str): + team_id (str): + team_name (str): + bot (SetWorkspaceSlackJsonBodyBot): + """ + + access_token: str + team_id: str + team_name: str + bot: SetWorkspaceSlackJsonBodyBot + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + access_token = self.access_token + team_id = self.team_id + team_name = self.team_name + bot = self.bot.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "access_token": access_token, + "team_id": team_id, + "team_name": team_name, + "bot": bot, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + access_token = d.pop("access_token") + + team_id = d.pop("team_id") + + team_name = d.pop("team_name") + + bot = SetWorkspaceSlackJsonBodyBot.from_dict(d.pop("bot")) + + set_workspace_slack_json_body = cls( + access_token=access_token, + team_id=team_id, + team_name=team_name, + bot=bot, + ) + + set_workspace_slack_json_body.additional_properties = d + return set_workspace_slack_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/set_workspace_slack_json_body_bot.py b/python-client/windmill-api/windmill_api/models/set_workspace_slack_json_body_bot.py new file mode 100644 index 0000000000..a0121cbb8a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/set_workspace_slack_json_body_bot.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SetWorkspaceSlackJsonBodyBot") + + +@attr.s(auto_attribs=True) +class SetWorkspaceSlackJsonBodyBot: + """ + Attributes: + bot_access_token (Union[Unset, str]): + """ + + bot_access_token: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + bot_access_token = self.bot_access_token + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if bot_access_token is not UNSET: + field_dict["bot_access_token"] = bot_access_token + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + bot_access_token = d.pop("bot_access_token", UNSET) + + set_workspace_slack_json_body_bot = cls( + bot_access_token=bot_access_token, + ) + + set_workspace_slack_json_body_bot.additional_properties = d + return set_workspace_slack_json_body_bot + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/slack_token.py b/python-client/windmill-api/windmill_api/models/slack_token.py new file mode 100644 index 0000000000..17afc9455e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/slack_token.py @@ -0,0 +1,80 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.slack_token_bot import SlackTokenBot + +T = TypeVar("T", bound="SlackToken") + + +@attr.s(auto_attribs=True) +class SlackToken: + """ + Attributes: + access_token (str): + team_id (str): + team_name (str): + bot (SlackTokenBot): + """ + + access_token: str + team_id: str + team_name: str + bot: SlackTokenBot + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + access_token = self.access_token + team_id = self.team_id + team_name = self.team_name + bot = self.bot.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "access_token": access_token, + "team_id": team_id, + "team_name": team_name, + "bot": bot, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + access_token = d.pop("access_token") + + team_id = d.pop("team_id") + + team_name = d.pop("team_name") + + bot = SlackTokenBot.from_dict(d.pop("bot")) + + slack_token = cls( + access_token=access_token, + team_id=team_id, + team_name=team_name, + bot=bot, + ) + + slack_token.additional_properties = d + return slack_token + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/slack_token_bot.py b/python-client/windmill-api/windmill_api/models/slack_token_bot.py new file mode 100644 index 0000000000..7882eb4920 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/slack_token_bot.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SlackTokenBot") + + +@attr.s(auto_attribs=True) +class SlackTokenBot: + """ + Attributes: + bot_access_token (Union[Unset, str]): + """ + + bot_access_token: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + bot_access_token = self.bot_access_token + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if bot_access_token is not UNSET: + field_dict["bot_access_token"] = bot_access_token + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + bot_access_token = d.pop("bot_access_token", UNSET) + + slack_token_bot = cls( + bot_access_token=bot_access_token, + ) + + slack_token_bot.additional_properties = d + return slack_token_bot + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/static_transform.py b/python-client/windmill-api/windmill_api/models/static_transform.py new file mode 100644 index 0000000000..e3cc446891 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/static_transform.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.static_transform_type import StaticTransformType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="StaticTransform") + + +@attr.s(auto_attribs=True) +class StaticTransform: + """ + Attributes: + type (StaticTransformType): + value (Union[Unset, Any]): + """ + + type: StaticTransformType + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = StaticTransformType(d.pop("type")) + + value = d.pop("value", UNSET) + + static_transform = cls( + type=type, + value=value, + ) + + static_transform.additional_properties = d + return static_transform + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/static_transform_type.py b/python-client/windmill-api/windmill_api/models/static_transform_type.py new file mode 100644 index 0000000000..98b4212d45 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/static_transform_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class StaticTransformType(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/token_response.py b/python-client/windmill-api/windmill_api/models/token_response.py new file mode 100644 index 0000000000..ede26325e0 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/token_response.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TokenResponse") + + +@attr.s(auto_attribs=True) +class TokenResponse: + """ + Attributes: + access_token (str): + expires_in (Union[Unset, int]): + refresh_token (Union[Unset, str]): + scope (Union[Unset, List[str]]): + """ + + access_token: str + expires_in: Union[Unset, int] = UNSET + refresh_token: Union[Unset, str] = UNSET + scope: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + access_token = self.access_token + expires_in = self.expires_in + refresh_token = self.refresh_token + scope: Union[Unset, List[str]] = UNSET + if not isinstance(self.scope, Unset): + scope = self.scope + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "access_token": access_token, + } + ) + if expires_in is not UNSET: + field_dict["expires_in"] = expires_in + if refresh_token is not UNSET: + field_dict["refresh_token"] = refresh_token + if scope is not UNSET: + field_dict["scope"] = scope + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + access_token = d.pop("access_token") + + expires_in = d.pop("expires_in", UNSET) + + refresh_token = d.pop("refresh_token", UNSET) + + scope = cast(List[str], d.pop("scope", UNSET)) + + token_response = cls( + access_token=access_token, + expires_in=expires_in, + refresh_token=refresh_token, + scope=scope, + ) + + token_response.additional_properties = d + return token_response + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/truncated_token.py b/python-client/windmill-api/windmill_api/models/truncated_token.py new file mode 100644 index 0000000000..21670f2c3f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/truncated_token.py @@ -0,0 +1,100 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TruncatedToken") + + +@attr.s(auto_attribs=True) +class TruncatedToken: + """ + Attributes: + token_prefix (str): + created_at (datetime.datetime): + last_used_at (datetime.datetime): + label (Union[Unset, str]): + expiration (Union[Unset, datetime.datetime]): + """ + + token_prefix: str + created_at: datetime.datetime + last_used_at: datetime.datetime + label: Union[Unset, str] = UNSET + expiration: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + token_prefix = self.token_prefix + created_at = self.created_at.isoformat() + + last_used_at = self.last_used_at.isoformat() + + label = self.label + expiration: Union[Unset, str] = UNSET + if not isinstance(self.expiration, Unset): + expiration = self.expiration.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "token_prefix": token_prefix, + "created_at": created_at, + "last_used_at": last_used_at, + } + ) + if label is not UNSET: + field_dict["label"] = label + if expiration is not UNSET: + field_dict["expiration"] = expiration + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + token_prefix = d.pop("token_prefix") + + created_at = isoparse(d.pop("created_at")) + + last_used_at = isoparse(d.pop("last_used_at")) + + label = d.pop("label", UNSET) + + _expiration = d.pop("expiration", UNSET) + expiration: Union[Unset, datetime.datetime] + if isinstance(_expiration, Unset): + expiration = UNSET + else: + expiration = isoparse(_expiration) + + truncated_token = cls( + token_prefix=token_prefix, + created_at=created_at, + last_used_at=last_used_at, + label=label, + expiration=expiration, + ) + + truncated_token.additional_properties = d + return truncated_token + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body.py new file mode 100644 index 0000000000..958abd8e22 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body.py @@ -0,0 +1,99 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.update_flow_json_body_schema import UpdateFlowJsonBodySchema +from ..models.update_flow_json_body_value import UpdateFlowJsonBodyValue +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateFlowJsonBody") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBody: + """ + Attributes: + summary (str): + value (UpdateFlowJsonBodyValue): + path (str): + description (Union[Unset, str]): + schema (Union[Unset, UpdateFlowJsonBodySchema]): + """ + + summary: str + value: UpdateFlowJsonBodyValue + path: str + description: Union[Unset, str] = UNSET + schema: Union[Unset, UpdateFlowJsonBodySchema] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + summary = self.summary + value = self.value.to_dict() + + path = self.path + description = self.description + schema: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.schema, Unset): + schema = self.schema.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "summary": summary, + "value": value, + "path": path, + } + ) + if description is not UNSET: + field_dict["description"] = description + if schema is not UNSET: + field_dict["schema"] = schema + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + summary = d.pop("summary") + + value = UpdateFlowJsonBodyValue.from_dict(d.pop("value")) + + path = d.pop("path") + + description = d.pop("description", UNSET) + + _schema = d.pop("schema", UNSET) + schema: Union[Unset, UpdateFlowJsonBodySchema] + if isinstance(_schema, Unset): + schema = UNSET + else: + schema = UpdateFlowJsonBodySchema.from_dict(_schema) + + update_flow_json_body = cls( + summary=summary, + value=value, + path=path, + description=description, + schema=schema, + ) + + update_flow_json_body.additional_properties = d + return update_flow_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_schema.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_schema.py new file mode 100644 index 0000000000..36b9c6c597 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_schema.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="UpdateFlowJsonBodySchema") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodySchema: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + update_flow_json_body_schema = cls() + + update_flow_json_body_schema.additional_properties = d + return update_flow_json_body_schema + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value.py new file mode 100644 index 0000000000..6a1abb0630 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value.py @@ -0,0 +1,95 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.update_flow_json_body_value_failure_module import UpdateFlowJsonBodyValueFailureModule +from ..models.update_flow_json_body_value_modules_item import UpdateFlowJsonBodyValueModulesItem +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateFlowJsonBodyValue") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValue: + """ + Attributes: + modules (List[UpdateFlowJsonBodyValueModulesItem]): + failure_module (Union[Unset, UpdateFlowJsonBodyValueFailureModule]): + same_worker (Union[Unset, bool]): + """ + + modules: List[UpdateFlowJsonBodyValueModulesItem] + failure_module: Union[Unset, UpdateFlowJsonBodyValueFailureModule] = UNSET + same_worker: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + modules = [] + for modules_item_data in self.modules: + modules_item = modules_item_data.to_dict() + + modules.append(modules_item) + + failure_module: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.failure_module, Unset): + failure_module = self.failure_module.to_dict() + + same_worker = self.same_worker + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "modules": modules, + } + ) + if failure_module is not UNSET: + field_dict["failure_module"] = failure_module + if same_worker is not UNSET: + field_dict["same_worker"] = same_worker + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + modules = [] + _modules = d.pop("modules") + for modules_item_data in _modules: + modules_item = UpdateFlowJsonBodyValueModulesItem.from_dict(modules_item_data) + + modules.append(modules_item) + + _failure_module = d.pop("failure_module", UNSET) + failure_module: Union[Unset, UpdateFlowJsonBodyValueFailureModule] + if isinstance(_failure_module, Unset): + failure_module = UNSET + else: + failure_module = UpdateFlowJsonBodyValueFailureModule.from_dict(_failure_module) + + same_worker = d.pop("same_worker", UNSET) + + update_flow_json_body_value = cls( + modules=modules, + failure_module=failure_module, + same_worker=same_worker, + ) + + update_flow_json_body_value.additional_properties = d + return update_flow_json_body_value + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module.py new file mode 100644 index 0000000000..c1a522a7ae --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module.py @@ -0,0 +1,249 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.update_flow_json_body_value_failure_module_input_transforms import ( + UpdateFlowJsonBodyValueFailureModuleInputTransforms, +) +from ..models.update_flow_json_body_value_failure_module_retry import UpdateFlowJsonBodyValueFailureModuleRetry +from ..models.update_flow_json_body_value_failure_module_sleep_type_0 import ( + UpdateFlowJsonBodyValueFailureModuleSleepType0, +) +from ..models.update_flow_json_body_value_failure_module_sleep_type_1 import ( + UpdateFlowJsonBodyValueFailureModuleSleepType1, +) +from ..models.update_flow_json_body_value_failure_module_stop_after_if import ( + UpdateFlowJsonBodyValueFailureModuleStopAfterIf, +) +from ..models.update_flow_json_body_value_failure_module_value_type_0 import ( + UpdateFlowJsonBodyValueFailureModuleValueType0, +) +from ..models.update_flow_json_body_value_failure_module_value_type_1 import ( + UpdateFlowJsonBodyValueFailureModuleValueType1, +) +from ..models.update_flow_json_body_value_failure_module_value_type_2 import ( + UpdateFlowJsonBodyValueFailureModuleValueType2, +) +from ..models.update_flow_json_body_value_failure_module_value_type_3 import ( + UpdateFlowJsonBodyValueFailureModuleValueType3, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueFailureModule") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueFailureModule: + """ + Attributes: + input_transforms (UpdateFlowJsonBodyValueFailureModuleInputTransforms): + value (Union[UpdateFlowJsonBodyValueFailureModuleValueType0, UpdateFlowJsonBodyValueFailureModuleValueType1, + UpdateFlowJsonBodyValueFailureModuleValueType2, UpdateFlowJsonBodyValueFailureModuleValueType3]): + stop_after_if (Union[Unset, UpdateFlowJsonBodyValueFailureModuleStopAfterIf]): + sleep (Union[Unset, UpdateFlowJsonBodyValueFailureModuleSleepType0, + UpdateFlowJsonBodyValueFailureModuleSleepType1]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, UpdateFlowJsonBodyValueFailureModuleRetry]): + """ + + input_transforms: UpdateFlowJsonBodyValueFailureModuleInputTransforms + value: Union[ + UpdateFlowJsonBodyValueFailureModuleValueType0, + UpdateFlowJsonBodyValueFailureModuleValueType1, + UpdateFlowJsonBodyValueFailureModuleValueType2, + UpdateFlowJsonBodyValueFailureModuleValueType3, + ] + stop_after_if: Union[Unset, UpdateFlowJsonBodyValueFailureModuleStopAfterIf] = UNSET + sleep: Union[ + Unset, UpdateFlowJsonBodyValueFailureModuleSleepType0, UpdateFlowJsonBodyValueFailureModuleSleepType1 + ] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, UpdateFlowJsonBodyValueFailureModuleRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, UpdateFlowJsonBodyValueFailureModuleValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, UpdateFlowJsonBodyValueFailureModuleValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, UpdateFlowJsonBodyValueFailureModuleValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, UpdateFlowJsonBodyValueFailureModuleSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = UpdateFlowJsonBodyValueFailureModuleInputTransforms.from_dict(d.pop("input_transforms")) + + def _parse_value( + data: object, + ) -> Union[ + UpdateFlowJsonBodyValueFailureModuleValueType0, + UpdateFlowJsonBodyValueFailureModuleValueType1, + UpdateFlowJsonBodyValueFailureModuleValueType2, + UpdateFlowJsonBodyValueFailureModuleValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = UpdateFlowJsonBodyValueFailureModuleValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = UpdateFlowJsonBodyValueFailureModuleValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = UpdateFlowJsonBodyValueFailureModuleValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = UpdateFlowJsonBodyValueFailureModuleValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, UpdateFlowJsonBodyValueFailureModuleStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = UpdateFlowJsonBodyValueFailureModuleStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[ + Unset, UpdateFlowJsonBodyValueFailureModuleSleepType0, UpdateFlowJsonBodyValueFailureModuleSleepType1 + ]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, UpdateFlowJsonBodyValueFailureModuleSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = UpdateFlowJsonBodyValueFailureModuleSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, UpdateFlowJsonBodyValueFailureModuleSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = UpdateFlowJsonBodyValueFailureModuleSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, UpdateFlowJsonBodyValueFailureModuleRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = UpdateFlowJsonBodyValueFailureModuleRetry.from_dict(_retry) + + update_flow_json_body_value_failure_module = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + update_flow_json_body_value_failure_module.additional_properties = d + return update_flow_json_body_value_failure_module + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_input_transforms.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_input_transforms.py new file mode 100644 index 0000000000..95508cf3f8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_input_transforms.py @@ -0,0 +1,107 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.update_flow_json_body_value_failure_module_input_transforms_additional_property_type_0 import ( + UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0, +) +from ..models.update_flow_json_body_value_failure_module_input_transforms_additional_property_type_1 import ( + UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueFailureModuleInputTransforms") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueFailureModuleInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0, + UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + update_flow_json_body_value_failure_module_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0, + UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0.from_dict(data) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1.from_dict(data) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + update_flow_json_body_value_failure_module_input_transforms.additional_properties = additional_properties + return update_flow_json_body_value_failure_module_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0, + UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0, + UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..37953ed2fc --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_input_transforms_additional_property_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.update_flow_json_body_value_failure_module_input_transforms_additional_property_type_0_type import ( + UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + update_flow_json_body_value_failure_module_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + update_flow_json_body_value_failure_module_input_transforms_additional_property_type_0.additional_properties = d + return update_flow_json_body_value_failure_module_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..9ae82af177 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..872a3722da --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_input_transforms_additional_property_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.update_flow_json_body_value_failure_module_input_transforms_additional_property_type_1_type import ( + UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + update_flow_json_body_value_failure_module_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + update_flow_json_body_value_failure_module_input_transforms_additional_property_type_1.additional_properties = d + return update_flow_json_body_value_failure_module_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..25bf2882df --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class UpdateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_retry.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_retry.py new file mode 100644 index 0000000000..85ea0d817f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_retry.py @@ -0,0 +1,86 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.update_flow_json_body_value_failure_module_retry_constant import ( + UpdateFlowJsonBodyValueFailureModuleRetryConstant, +) +from ..models.update_flow_json_body_value_failure_module_retry_exponential import ( + UpdateFlowJsonBodyValueFailureModuleRetryExponential, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueFailureModuleRetry") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueFailureModuleRetry: + """ + Attributes: + constant (Union[Unset, UpdateFlowJsonBodyValueFailureModuleRetryConstant]): + exponential (Union[Unset, UpdateFlowJsonBodyValueFailureModuleRetryExponential]): + """ + + constant: Union[Unset, UpdateFlowJsonBodyValueFailureModuleRetryConstant] = UNSET + exponential: Union[Unset, UpdateFlowJsonBodyValueFailureModuleRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, UpdateFlowJsonBodyValueFailureModuleRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = UpdateFlowJsonBodyValueFailureModuleRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, UpdateFlowJsonBodyValueFailureModuleRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = UpdateFlowJsonBodyValueFailureModuleRetryExponential.from_dict(_exponential) + + update_flow_json_body_value_failure_module_retry = cls( + constant=constant, + exponential=exponential, + ) + + update_flow_json_body_value_failure_module_retry.additional_properties = d + return update_flow_json_body_value_failure_module_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_retry_constant.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_retry_constant.py new file mode 100644 index 0000000000..f7b99e3419 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueFailureModuleRetryConstant") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueFailureModuleRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + update_flow_json_body_value_failure_module_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + update_flow_json_body_value_failure_module_retry_constant.additional_properties = d + return update_flow_json_body_value_failure_module_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_retry_exponential.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_retry_exponential.py new file mode 100644 index 0000000000..4615a644da --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueFailureModuleRetryExponential") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueFailureModuleRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + update_flow_json_body_value_failure_module_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + update_flow_json_body_value_failure_module_retry_exponential.additional_properties = d + return update_flow_json_body_value_failure_module_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_sleep_type_0.py new file mode 100644 index 0000000000..956d86e6bf --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_sleep_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.update_flow_json_body_value_failure_module_sleep_type_0_type import ( + UpdateFlowJsonBodyValueFailureModuleSleepType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueFailureModuleSleepType0") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueFailureModuleSleepType0: + """ + Attributes: + type (UpdateFlowJsonBodyValueFailureModuleSleepType0Type): + value (Union[Unset, Any]): + """ + + type: UpdateFlowJsonBodyValueFailureModuleSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = UpdateFlowJsonBodyValueFailureModuleSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + update_flow_json_body_value_failure_module_sleep_type_0 = cls( + type=type, + value=value, + ) + + update_flow_json_body_value_failure_module_sleep_type_0.additional_properties = d + return update_flow_json_body_value_failure_module_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_sleep_type_0_type.py new file mode 100644 index 0000000000..a2e1813add --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class UpdateFlowJsonBodyValueFailureModuleSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_sleep_type_1.py new file mode 100644 index 0000000000..1790b54586 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_sleep_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.update_flow_json_body_value_failure_module_sleep_type_1_type import ( + UpdateFlowJsonBodyValueFailureModuleSleepType1Type, +) + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueFailureModuleSleepType1") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueFailureModuleSleepType1: + """ + Attributes: + expr (str): + type (UpdateFlowJsonBodyValueFailureModuleSleepType1Type): + """ + + expr: str + type: UpdateFlowJsonBodyValueFailureModuleSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = UpdateFlowJsonBodyValueFailureModuleSleepType1Type(d.pop("type")) + + update_flow_json_body_value_failure_module_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + update_flow_json_body_value_failure_module_sleep_type_1.additional_properties = d + return update_flow_json_body_value_failure_module_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_sleep_type_1_type.py new file mode 100644 index 0000000000..47ea93f4f1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class UpdateFlowJsonBodyValueFailureModuleSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_stop_after_if.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_stop_after_if.py new file mode 100644 index 0000000000..e3d553fc29 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueFailureModuleStopAfterIf") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueFailureModuleStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + update_flow_json_body_value_failure_module_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + update_flow_json_body_value_failure_module_stop_after_if.additional_properties = d + return update_flow_json_body_value_failure_module_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_0.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_0.py new file mode 100644 index 0000000000..cdcd24035d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.update_flow_json_body_value_failure_module_value_type_0_language import ( + UpdateFlowJsonBodyValueFailureModuleValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueFailureModuleValueType0") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueFailureModuleValueType0: + """ + Attributes: + content (str): + language (UpdateFlowJsonBodyValueFailureModuleValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: UpdateFlowJsonBodyValueFailureModuleValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = UpdateFlowJsonBodyValueFailureModuleValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + update_flow_json_body_value_failure_module_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + update_flow_json_body_value_failure_module_value_type_0.additional_properties = d + return update_flow_json_body_value_failure_module_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_0_language.py new file mode 100644 index 0000000000..1e686fd5d8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class UpdateFlowJsonBodyValueFailureModuleValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_1.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_1.py new file mode 100644 index 0000000000..302de1d194 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.update_flow_json_body_value_failure_module_value_type_1_type import ( + UpdateFlowJsonBodyValueFailureModuleValueType1Type, +) + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueFailureModuleValueType1") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueFailureModuleValueType1: + """ + Attributes: + path (str): + type (UpdateFlowJsonBodyValueFailureModuleValueType1Type): + """ + + path: str + type: UpdateFlowJsonBodyValueFailureModuleValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = UpdateFlowJsonBodyValueFailureModuleValueType1Type(d.pop("type")) + + update_flow_json_body_value_failure_module_value_type_1 = cls( + path=path, + type=type, + ) + + update_flow_json_body_value_failure_module_value_type_1.additional_properties = d + return update_flow_json_body_value_failure_module_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_1_type.py new file mode 100644 index 0000000000..6b46cb950a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class UpdateFlowJsonBodyValueFailureModuleValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2.py new file mode 100644 index 0000000000..e5b00e3200 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2.py @@ -0,0 +1,112 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.update_flow_json_body_value_failure_module_value_type_2_iterator_type_0 import ( + UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType0, +) +from ..models.update_flow_json_body_value_failure_module_value_type_2_iterator_type_1 import ( + UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType1, +) +from ..models.update_flow_json_body_value_failure_module_value_type_2_type import ( + UpdateFlowJsonBodyValueFailureModuleValueType2Type, +) + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueFailureModuleValueType2") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueFailureModuleValueType2: + """ + Attributes: + iterator (Union[UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType0, + UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType1]): + skip_failures (bool): + type (UpdateFlowJsonBodyValueFailureModuleValueType2Type): + """ + + iterator: Union[ + UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType0, + UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType1, + ] + skip_failures: bool + type: UpdateFlowJsonBodyValueFailureModuleValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType0, + UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = UpdateFlowJsonBodyValueFailureModuleValueType2Type(d.pop("type")) + + update_flow_json_body_value_failure_module_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + update_flow_json_body_value_failure_module_value_type_2.additional_properties = d + return update_flow_json_body_value_failure_module_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..d582dcef0f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.update_flow_json_body_value_failure_module_value_type_2_iterator_type_0_type import ( + UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType0: + """ + Attributes: + type (UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + update_flow_json_body_value_failure_module_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + update_flow_json_body_value_failure_module_value_type_2_iterator_type_0.additional_properties = d + return update_flow_json_body_value_failure_module_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..b19d7c29b6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..0d834d33b1 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.update_flow_json_body_value_failure_module_value_type_2_iterator_type_1_type import ( + UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType1: + """ + Attributes: + expr (str): + type (UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType1Type): + """ + + expr: str + type: UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType1Type(d.pop("type")) + + update_flow_json_body_value_failure_module_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + update_flow_json_body_value_failure_module_value_type_2_iterator_type_1.additional_properties = d + return update_flow_json_body_value_failure_module_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..ddce6620e9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class UpdateFlowJsonBodyValueFailureModuleValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2_type.py new file mode 100644 index 0000000000..45527ca046 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class UpdateFlowJsonBodyValueFailureModuleValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_3.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_3.py new file mode 100644 index 0000000000..b21badd621 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_3.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.update_flow_json_body_value_failure_module_value_type_3_type import ( + UpdateFlowJsonBodyValueFailureModuleValueType3Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueFailureModuleValueType3") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueFailureModuleValueType3: + """ + Attributes: + type (UpdateFlowJsonBodyValueFailureModuleValueType3Type): + path (Union[Unset, str]): + """ + + type: UpdateFlowJsonBodyValueFailureModuleValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = UpdateFlowJsonBodyValueFailureModuleValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + update_flow_json_body_value_failure_module_value_type_3 = cls( + type=type, + path=path, + ) + + update_flow_json_body_value_failure_module_value_type_3.additional_properties = d + return update_flow_json_body_value_failure_module_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_3_type.py new file mode 100644 index 0000000000..e573ade1cf --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_failure_module_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class UpdateFlowJsonBodyValueFailureModuleValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item.py new file mode 100644 index 0000000000..43ebe61a47 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item.py @@ -0,0 +1,235 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.update_flow_json_body_value_modules_item_input_transforms import ( + UpdateFlowJsonBodyValueModulesItemInputTransforms, +) +from ..models.update_flow_json_body_value_modules_item_retry import UpdateFlowJsonBodyValueModulesItemRetry +from ..models.update_flow_json_body_value_modules_item_sleep_type_0 import UpdateFlowJsonBodyValueModulesItemSleepType0 +from ..models.update_flow_json_body_value_modules_item_sleep_type_1 import UpdateFlowJsonBodyValueModulesItemSleepType1 +from ..models.update_flow_json_body_value_modules_item_stop_after_if import ( + UpdateFlowJsonBodyValueModulesItemStopAfterIf, +) +from ..models.update_flow_json_body_value_modules_item_value_type_0 import UpdateFlowJsonBodyValueModulesItemValueType0 +from ..models.update_flow_json_body_value_modules_item_value_type_1 import UpdateFlowJsonBodyValueModulesItemValueType1 +from ..models.update_flow_json_body_value_modules_item_value_type_2 import UpdateFlowJsonBodyValueModulesItemValueType2 +from ..models.update_flow_json_body_value_modules_item_value_type_3 import UpdateFlowJsonBodyValueModulesItemValueType3 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueModulesItem") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueModulesItem: + """ + Attributes: + input_transforms (UpdateFlowJsonBodyValueModulesItemInputTransforms): + value (Union[UpdateFlowJsonBodyValueModulesItemValueType0, UpdateFlowJsonBodyValueModulesItemValueType1, + UpdateFlowJsonBodyValueModulesItemValueType2, UpdateFlowJsonBodyValueModulesItemValueType3]): + stop_after_if (Union[Unset, UpdateFlowJsonBodyValueModulesItemStopAfterIf]): + sleep (Union[Unset, UpdateFlowJsonBodyValueModulesItemSleepType0, + UpdateFlowJsonBodyValueModulesItemSleepType1]): + summary (Union[Unset, str]): + suspend (Union[Unset, int]): + retry (Union[Unset, UpdateFlowJsonBodyValueModulesItemRetry]): + """ + + input_transforms: UpdateFlowJsonBodyValueModulesItemInputTransforms + value: Union[ + UpdateFlowJsonBodyValueModulesItemValueType0, + UpdateFlowJsonBodyValueModulesItemValueType1, + UpdateFlowJsonBodyValueModulesItemValueType2, + UpdateFlowJsonBodyValueModulesItemValueType3, + ] + stop_after_if: Union[Unset, UpdateFlowJsonBodyValueModulesItemStopAfterIf] = UNSET + sleep: Union[ + Unset, UpdateFlowJsonBodyValueModulesItemSleepType0, UpdateFlowJsonBodyValueModulesItemSleepType1 + ] = UNSET + summary: Union[Unset, str] = UNSET + suspend: Union[Unset, int] = UNSET + retry: Union[Unset, UpdateFlowJsonBodyValueModulesItemRetry] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + input_transforms = self.input_transforms.to_dict() + + if isinstance(self.value, UpdateFlowJsonBodyValueModulesItemValueType0): + value = self.value.to_dict() + + elif isinstance(self.value, UpdateFlowJsonBodyValueModulesItemValueType1): + value = self.value.to_dict() + + elif isinstance(self.value, UpdateFlowJsonBodyValueModulesItemValueType2): + value = self.value.to_dict() + + else: + value = self.value.to_dict() + + stop_after_if: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.stop_after_if, Unset): + stop_after_if = self.stop_after_if.to_dict() + + sleep: Union[Dict[str, Any], Unset] + if isinstance(self.sleep, Unset): + sleep = UNSET + + elif isinstance(self.sleep, UpdateFlowJsonBodyValueModulesItemSleepType0): + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + else: + sleep = UNSET + if not isinstance(self.sleep, Unset): + sleep = self.sleep.to_dict() + + summary = self.summary + suspend = self.suspend + retry: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.retry, Unset): + retry = self.retry.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input_transforms": input_transforms, + "value": value, + } + ) + if stop_after_if is not UNSET: + field_dict["stop_after_if"] = stop_after_if + if sleep is not UNSET: + field_dict["sleep"] = sleep + if summary is not UNSET: + field_dict["summary"] = summary + if suspend is not UNSET: + field_dict["suspend"] = suspend + if retry is not UNSET: + field_dict["retry"] = retry + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + input_transforms = UpdateFlowJsonBodyValueModulesItemInputTransforms.from_dict(d.pop("input_transforms")) + + def _parse_value( + data: object, + ) -> Union[ + UpdateFlowJsonBodyValueModulesItemValueType0, + UpdateFlowJsonBodyValueModulesItemValueType1, + UpdateFlowJsonBodyValueModulesItemValueType2, + UpdateFlowJsonBodyValueModulesItemValueType3, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + value_type_0 = UpdateFlowJsonBodyValueModulesItemValueType0.from_dict(data) + + return value_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_1 = UpdateFlowJsonBodyValueModulesItemValueType1.from_dict(data) + + return value_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + value_type_2 = UpdateFlowJsonBodyValueModulesItemValueType2.from_dict(data) + + return value_type_2 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + value_type_3 = UpdateFlowJsonBodyValueModulesItemValueType3.from_dict(data) + + return value_type_3 + + value = _parse_value(d.pop("value")) + + _stop_after_if = d.pop("stop_after_if", UNSET) + stop_after_if: Union[Unset, UpdateFlowJsonBodyValueModulesItemStopAfterIf] + if isinstance(_stop_after_if, Unset): + stop_after_if = UNSET + else: + stop_after_if = UpdateFlowJsonBodyValueModulesItemStopAfterIf.from_dict(_stop_after_if) + + def _parse_sleep( + data: object, + ) -> Union[Unset, UpdateFlowJsonBodyValueModulesItemSleepType0, UpdateFlowJsonBodyValueModulesItemSleepType1]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + _sleep_type_0 = data + sleep_type_0: Union[Unset, UpdateFlowJsonBodyValueModulesItemSleepType0] + if isinstance(_sleep_type_0, Unset): + sleep_type_0 = UNSET + else: + sleep_type_0 = UpdateFlowJsonBodyValueModulesItemSleepType0.from_dict(_sleep_type_0) + + return sleep_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + _sleep_type_1 = data + sleep_type_1: Union[Unset, UpdateFlowJsonBodyValueModulesItemSleepType1] + if isinstance(_sleep_type_1, Unset): + sleep_type_1 = UNSET + else: + sleep_type_1 = UpdateFlowJsonBodyValueModulesItemSleepType1.from_dict(_sleep_type_1) + + return sleep_type_1 + + sleep = _parse_sleep(d.pop("sleep", UNSET)) + + summary = d.pop("summary", UNSET) + + suspend = d.pop("suspend", UNSET) + + _retry = d.pop("retry", UNSET) + retry: Union[Unset, UpdateFlowJsonBodyValueModulesItemRetry] + if isinstance(_retry, Unset): + retry = UNSET + else: + retry = UpdateFlowJsonBodyValueModulesItemRetry.from_dict(_retry) + + update_flow_json_body_value_modules_item = cls( + input_transforms=input_transforms, + value=value, + stop_after_if=stop_after_if, + sleep=sleep, + summary=summary, + suspend=suspend, + retry=retry, + ) + + update_flow_json_body_value_modules_item.additional_properties = d + return update_flow_json_body_value_modules_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_input_transforms.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_input_transforms.py new file mode 100644 index 0000000000..37cb6d69f5 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_input_transforms.py @@ -0,0 +1,107 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.update_flow_json_body_value_modules_item_input_transforms_additional_property_type_0 import ( + UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0, +) +from ..models.update_flow_json_body_value_modules_item_input_transforms_additional_property_type_1 import ( + UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1, +) + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueModulesItemInputTransforms") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueModulesItemInputTransforms: + """ """ + + additional_properties: Dict[ + str, + Union[ + UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0, + UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1, + ], + ] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + + if isinstance(prop, UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0): + field_dict[prop_name] = prop.to_dict() + + else: + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + update_flow_json_body_value_modules_item_input_transforms = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property( + data: object, + ) -> Union[ + UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0, + UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + additional_property_type_0 = ( + UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0.from_dict(data) + ) + + return additional_property_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + additional_property_type_1 = ( + UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1.from_dict(data) + ) + + return additional_property_type_1 + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + update_flow_json_body_value_modules_item_input_transforms.additional_properties = additional_properties + return update_flow_json_body_value_modules_item_input_transforms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> Union[ + UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0, + UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1, + ]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: Union[ + UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0, + UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1, + ], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_input_transforms_additional_property_type_0.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_input_transforms_additional_property_type_0.py new file mode 100644 index 0000000000..22184b7482 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_input_transforms_additional_property_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.update_flow_json_body_value_modules_item_input_transforms_additional_property_type_0_type import ( + UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0: + """ + Attributes: + type (UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0Type): + value (Union[Unset, Any]): + """ + + type: UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + update_flow_json_body_value_modules_item_input_transforms_additional_property_type_0 = cls( + type=type, + value=value, + ) + + update_flow_json_body_value_modules_item_input_transforms_additional_property_type_0.additional_properties = d + return update_flow_json_body_value_modules_item_input_transforms_additional_property_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_input_transforms_additional_property_type_0_type.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_input_transforms_additional_property_type_0_type.py new file mode 100644 index 0000000000..38dd756c01 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_input_transforms_additional_property_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_input_transforms_additional_property_type_1.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_input_transforms_additional_property_type_1.py new file mode 100644 index 0000000000..5cf0304809 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_input_transforms_additional_property_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.update_flow_json_body_value_modules_item_input_transforms_additional_property_type_1_type import ( + UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1Type, +) + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1: + """ + Attributes: + expr (str): + type (UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1Type): + """ + + expr: str + type: UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1Type(d.pop("type")) + + update_flow_json_body_value_modules_item_input_transforms_additional_property_type_1 = cls( + expr=expr, + type=type, + ) + + update_flow_json_body_value_modules_item_input_transforms_additional_property_type_1.additional_properties = d + return update_flow_json_body_value_modules_item_input_transforms_additional_property_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_input_transforms_additional_property_type_1_type.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_input_transforms_additional_property_type_1_type.py new file mode 100644 index 0000000000..a5d29915be --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_input_transforms_additional_property_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class UpdateFlowJsonBodyValueModulesItemInputTransformsAdditionalPropertyType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_retry.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_retry.py new file mode 100644 index 0000000000..e78a07b0e7 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_retry.py @@ -0,0 +1,86 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.update_flow_json_body_value_modules_item_retry_constant import ( + UpdateFlowJsonBodyValueModulesItemRetryConstant, +) +from ..models.update_flow_json_body_value_modules_item_retry_exponential import ( + UpdateFlowJsonBodyValueModulesItemRetryExponential, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueModulesItemRetry") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueModulesItemRetry: + """ + Attributes: + constant (Union[Unset, UpdateFlowJsonBodyValueModulesItemRetryConstant]): + exponential (Union[Unset, UpdateFlowJsonBodyValueModulesItemRetryExponential]): + """ + + constant: Union[Unset, UpdateFlowJsonBodyValueModulesItemRetryConstant] = UNSET + exponential: Union[Unset, UpdateFlowJsonBodyValueModulesItemRetryExponential] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + constant: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.constant, Unset): + constant = self.constant.to_dict() + + exponential: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.exponential, Unset): + exponential = self.exponential.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if constant is not UNSET: + field_dict["constant"] = constant + if exponential is not UNSET: + field_dict["exponential"] = exponential + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _constant = d.pop("constant", UNSET) + constant: Union[Unset, UpdateFlowJsonBodyValueModulesItemRetryConstant] + if isinstance(_constant, Unset): + constant = UNSET + else: + constant = UpdateFlowJsonBodyValueModulesItemRetryConstant.from_dict(_constant) + + _exponential = d.pop("exponential", UNSET) + exponential: Union[Unset, UpdateFlowJsonBodyValueModulesItemRetryExponential] + if isinstance(_exponential, Unset): + exponential = UNSET + else: + exponential = UpdateFlowJsonBodyValueModulesItemRetryExponential.from_dict(_exponential) + + update_flow_json_body_value_modules_item_retry = cls( + constant=constant, + exponential=exponential, + ) + + update_flow_json_body_value_modules_item_retry.additional_properties = d + return update_flow_json_body_value_modules_item_retry + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_retry_constant.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_retry_constant.py new file mode 100644 index 0000000000..b856173b35 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_retry_constant.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueModulesItemRetryConstant") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueModulesItemRetryConstant: + """ + Attributes: + attempts (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + seconds = d.pop("seconds", UNSET) + + update_flow_json_body_value_modules_item_retry_constant = cls( + attempts=attempts, + seconds=seconds, + ) + + update_flow_json_body_value_modules_item_retry_constant.additional_properties = d + return update_flow_json_body_value_modules_item_retry_constant + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_retry_exponential.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_retry_exponential.py new file mode 100644 index 0000000000..a24530ac54 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_retry_exponential.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueModulesItemRetryExponential") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueModulesItemRetryExponential: + """ + Attributes: + attempts (Union[Unset, int]): + multiplier (Union[Unset, int]): + seconds (Union[Unset, int]): + """ + + attempts: Union[Unset, int] = UNSET + multiplier: Union[Unset, int] = UNSET + seconds: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + attempts = self.attempts + multiplier = self.multiplier + seconds = self.seconds + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attempts is not UNSET: + field_dict["attempts"] = attempts + if multiplier is not UNSET: + field_dict["multiplier"] = multiplier + if seconds is not UNSET: + field_dict["seconds"] = seconds + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + attempts = d.pop("attempts", UNSET) + + multiplier = d.pop("multiplier", UNSET) + + seconds = d.pop("seconds", UNSET) + + update_flow_json_body_value_modules_item_retry_exponential = cls( + attempts=attempts, + multiplier=multiplier, + seconds=seconds, + ) + + update_flow_json_body_value_modules_item_retry_exponential.additional_properties = d + return update_flow_json_body_value_modules_item_retry_exponential + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_sleep_type_0.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_sleep_type_0.py new file mode 100644 index 0000000000..71ca533ec9 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_sleep_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.update_flow_json_body_value_modules_item_sleep_type_0_type import ( + UpdateFlowJsonBodyValueModulesItemSleepType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueModulesItemSleepType0") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueModulesItemSleepType0: + """ + Attributes: + type (UpdateFlowJsonBodyValueModulesItemSleepType0Type): + value (Union[Unset, Any]): + """ + + type: UpdateFlowJsonBodyValueModulesItemSleepType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = UpdateFlowJsonBodyValueModulesItemSleepType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + update_flow_json_body_value_modules_item_sleep_type_0 = cls( + type=type, + value=value, + ) + + update_flow_json_body_value_modules_item_sleep_type_0.additional_properties = d + return update_flow_json_body_value_modules_item_sleep_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_sleep_type_0_type.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_sleep_type_0_type.py new file mode 100644 index 0000000000..a0c7495d19 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_sleep_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class UpdateFlowJsonBodyValueModulesItemSleepType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_sleep_type_1.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_sleep_type_1.py new file mode 100644 index 0000000000..b5764dff30 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_sleep_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.update_flow_json_body_value_modules_item_sleep_type_1_type import ( + UpdateFlowJsonBodyValueModulesItemSleepType1Type, +) + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueModulesItemSleepType1") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueModulesItemSleepType1: + """ + Attributes: + expr (str): + type (UpdateFlowJsonBodyValueModulesItemSleepType1Type): + """ + + expr: str + type: UpdateFlowJsonBodyValueModulesItemSleepType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = UpdateFlowJsonBodyValueModulesItemSleepType1Type(d.pop("type")) + + update_flow_json_body_value_modules_item_sleep_type_1 = cls( + expr=expr, + type=type, + ) + + update_flow_json_body_value_modules_item_sleep_type_1.additional_properties = d + return update_flow_json_body_value_modules_item_sleep_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_sleep_type_1_type.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_sleep_type_1_type.py new file mode 100644 index 0000000000..7dfd2dfbc8 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_sleep_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class UpdateFlowJsonBodyValueModulesItemSleepType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_stop_after_if.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_stop_after_if.py new file mode 100644 index 0000000000..be592b3861 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_stop_after_if.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueModulesItemStopAfterIf") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueModulesItemStopAfterIf: + """ + Attributes: + expr (str): + skip_if_stopped (Union[Unset, bool]): + """ + + expr: str + skip_if_stopped: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + skip_if_stopped = self.skip_if_stopped + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + } + ) + if skip_if_stopped is not UNSET: + field_dict["skip_if_stopped"] = skip_if_stopped + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + skip_if_stopped = d.pop("skip_if_stopped", UNSET) + + update_flow_json_body_value_modules_item_stop_after_if = cls( + expr=expr, + skip_if_stopped=skip_if_stopped, + ) + + update_flow_json_body_value_modules_item_stop_after_if.additional_properties = d + return update_flow_json_body_value_modules_item_stop_after_if + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_0.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_0.py new file mode 100644 index 0000000000..55c09957cc --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_0.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.update_flow_json_body_value_modules_item_value_type_0_language import ( + UpdateFlowJsonBodyValueModulesItemValueType0Language, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueModulesItemValueType0") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueModulesItemValueType0: + """ + Attributes: + content (str): + language (UpdateFlowJsonBodyValueModulesItemValueType0Language): + type (str): + path (Union[Unset, str]): + """ + + content: str + language: UpdateFlowJsonBodyValueModulesItemValueType0Language + type: str + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + content = self.content + language = self.language.value + + type = self.type + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + "language": language, + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + content = d.pop("content") + + language = UpdateFlowJsonBodyValueModulesItemValueType0Language(d.pop("language")) + + type = d.pop("type") + + path = d.pop("path", UNSET) + + update_flow_json_body_value_modules_item_value_type_0 = cls( + content=content, + language=language, + type=type, + path=path, + ) + + update_flow_json_body_value_modules_item_value_type_0.additional_properties = d + return update_flow_json_body_value_modules_item_value_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_0_language.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_0_language.py new file mode 100644 index 0000000000..e9b3854e0b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_0_language.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class UpdateFlowJsonBodyValueModulesItemValueType0Language(str, Enum): + DENO = "deno" + PYTHON3 = "python3" + GO = "go" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_1.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_1.py new file mode 100644 index 0000000000..311a324910 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.update_flow_json_body_value_modules_item_value_type_1_type import ( + UpdateFlowJsonBodyValueModulesItemValueType1Type, +) + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueModulesItemValueType1") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueModulesItemValueType1: + """ + Attributes: + path (str): + type (UpdateFlowJsonBodyValueModulesItemValueType1Type): + """ + + path: str + type: UpdateFlowJsonBodyValueModulesItemValueType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path") + + type = UpdateFlowJsonBodyValueModulesItemValueType1Type(d.pop("type")) + + update_flow_json_body_value_modules_item_value_type_1 = cls( + path=path, + type=type, + ) + + update_flow_json_body_value_modules_item_value_type_1.additional_properties = d + return update_flow_json_body_value_modules_item_value_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_1_type.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_1_type.py new file mode 100644 index 0000000000..8d0d1ed3da --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class UpdateFlowJsonBodyValueModulesItemValueType1Type(str, Enum): + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2.py new file mode 100644 index 0000000000..017ab49e97 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2.py @@ -0,0 +1,112 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.update_flow_json_body_value_modules_item_value_type_2_iterator_type_0 import ( + UpdateFlowJsonBodyValueModulesItemValueType2IteratorType0, +) +from ..models.update_flow_json_body_value_modules_item_value_type_2_iterator_type_1 import ( + UpdateFlowJsonBodyValueModulesItemValueType2IteratorType1, +) +from ..models.update_flow_json_body_value_modules_item_value_type_2_type import ( + UpdateFlowJsonBodyValueModulesItemValueType2Type, +) + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueModulesItemValueType2") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueModulesItemValueType2: + """ + Attributes: + iterator (Union[UpdateFlowJsonBodyValueModulesItemValueType2IteratorType0, + UpdateFlowJsonBodyValueModulesItemValueType2IteratorType1]): + skip_failures (bool): + type (UpdateFlowJsonBodyValueModulesItemValueType2Type): + """ + + iterator: Union[ + UpdateFlowJsonBodyValueModulesItemValueType2IteratorType0, + UpdateFlowJsonBodyValueModulesItemValueType2IteratorType1, + ] + skip_failures: bool + type: UpdateFlowJsonBodyValueModulesItemValueType2Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + if isinstance(self.iterator, UpdateFlowJsonBodyValueModulesItemValueType2IteratorType0): + iterator = self.iterator.to_dict() + + else: + iterator = self.iterator.to_dict() + + skip_failures = self.skip_failures + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "iterator": iterator, + "skip_failures": skip_failures, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + + def _parse_iterator( + data: object, + ) -> Union[ + UpdateFlowJsonBodyValueModulesItemValueType2IteratorType0, + UpdateFlowJsonBodyValueModulesItemValueType2IteratorType1, + ]: + try: + if not isinstance(data, dict): + raise TypeError() + iterator_type_0 = UpdateFlowJsonBodyValueModulesItemValueType2IteratorType0.from_dict(data) + + return iterator_type_0 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + iterator_type_1 = UpdateFlowJsonBodyValueModulesItemValueType2IteratorType1.from_dict(data) + + return iterator_type_1 + + iterator = _parse_iterator(d.pop("iterator")) + + skip_failures = d.pop("skip_failures") + + type = UpdateFlowJsonBodyValueModulesItemValueType2Type(d.pop("type")) + + update_flow_json_body_value_modules_item_value_type_2 = cls( + iterator=iterator, + skip_failures=skip_failures, + type=type, + ) + + update_flow_json_body_value_modules_item_value_type_2.additional_properties = d + return update_flow_json_body_value_modules_item_value_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2_iterator_type_0.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2_iterator_type_0.py new file mode 100644 index 0000000000..c07135cdeb --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2_iterator_type_0.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.update_flow_json_body_value_modules_item_value_type_2_iterator_type_0_type import ( + UpdateFlowJsonBodyValueModulesItemValueType2IteratorType0Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueModulesItemValueType2IteratorType0") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueModulesItemValueType2IteratorType0: + """ + Attributes: + type (UpdateFlowJsonBodyValueModulesItemValueType2IteratorType0Type): + value (Union[Unset, Any]): + """ + + type: UpdateFlowJsonBodyValueModulesItemValueType2IteratorType0Type + value: Union[Unset, Any] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = UpdateFlowJsonBodyValueModulesItemValueType2IteratorType0Type(d.pop("type")) + + value = d.pop("value", UNSET) + + update_flow_json_body_value_modules_item_value_type_2_iterator_type_0 = cls( + type=type, + value=value, + ) + + update_flow_json_body_value_modules_item_value_type_2_iterator_type_0.additional_properties = d + return update_flow_json_body_value_modules_item_value_type_2_iterator_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2_iterator_type_0_type.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2_iterator_type_0_type.py new file mode 100644 index 0000000000..2b80e56319 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2_iterator_type_0_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class UpdateFlowJsonBodyValueModulesItemValueType2IteratorType0Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2_iterator_type_1.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2_iterator_type_1.py new file mode 100644 index 0000000000..60b532b650 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2_iterator_type_1.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.update_flow_json_body_value_modules_item_value_type_2_iterator_type_1_type import ( + UpdateFlowJsonBodyValueModulesItemValueType2IteratorType1Type, +) + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueModulesItemValueType2IteratorType1") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueModulesItemValueType2IteratorType1: + """ + Attributes: + expr (str): + type (UpdateFlowJsonBodyValueModulesItemValueType2IteratorType1Type): + """ + + expr: str + type: UpdateFlowJsonBodyValueModulesItemValueType2IteratorType1Type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expr = self.expr + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expr": expr, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expr = d.pop("expr") + + type = UpdateFlowJsonBodyValueModulesItemValueType2IteratorType1Type(d.pop("type")) + + update_flow_json_body_value_modules_item_value_type_2_iterator_type_1 = cls( + expr=expr, + type=type, + ) + + update_flow_json_body_value_modules_item_value_type_2_iterator_type_1.additional_properties = d + return update_flow_json_body_value_modules_item_value_type_2_iterator_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2_iterator_type_1_type.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2_iterator_type_1_type.py new file mode 100644 index 0000000000..2541991e10 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2_iterator_type_1_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class UpdateFlowJsonBodyValueModulesItemValueType2IteratorType1Type(str, Enum): + JAVASCRIPT = "javascript" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2_type.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2_type.py new file mode 100644 index 0000000000..263fc4f20e --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_2_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class UpdateFlowJsonBodyValueModulesItemValueType2Type(str, Enum): + FORLOOPFLOW = "forloopflow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_3.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_3.py new file mode 100644 index 0000000000..d9619d6b56 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_3.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.update_flow_json_body_value_modules_item_value_type_3_type import ( + UpdateFlowJsonBodyValueModulesItemValueType3Type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateFlowJsonBodyValueModulesItemValueType3") + + +@attr.s(auto_attribs=True) +class UpdateFlowJsonBodyValueModulesItemValueType3: + """ + Attributes: + type (UpdateFlowJsonBodyValueModulesItemValueType3Type): + path (Union[Unset, str]): + """ + + type: UpdateFlowJsonBodyValueModulesItemValueType3Type + path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + path = self.path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + if path is not UNSET: + field_dict["path"] = path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = UpdateFlowJsonBodyValueModulesItemValueType3Type(d.pop("type")) + + path = d.pop("path", UNSET) + + update_flow_json_body_value_modules_item_value_type_3 = cls( + type=type, + path=path, + ) + + update_flow_json_body_value_modules_item_value_type_3.additional_properties = d + return update_flow_json_body_value_modules_item_value_type_3 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_3_type.py b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_3_type.py new file mode 100644 index 0000000000..ad33e12529 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_flow_json_body_value_modules_item_value_type_3_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class UpdateFlowJsonBodyValueModulesItemValueType3Type(str, Enum): + FLOW = "flow" + + def __str__(self) -> str: + return str(self.value) diff --git a/python-client/windmill-api/windmill_api/models/update_group_json_body.py b/python-client/windmill-api/windmill_api/models/update_group_json_body.py new file mode 100644 index 0000000000..588034c969 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_group_json_body.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateGroupJsonBody") + + +@attr.s(auto_attribs=True) +class UpdateGroupJsonBody: + """ + Attributes: + summary (Union[Unset, str]): + """ + + summary: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + summary = self.summary + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if summary is not UNSET: + field_dict["summary"] = summary + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + summary = d.pop("summary", UNSET) + + update_group_json_body = cls( + summary=summary, + ) + + update_group_json_body.additional_properties = d + return update_group_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_resource_json_body.py b/python-client/windmill-api/windmill_api/models/update_resource_json_body.py new file mode 100644 index 0000000000..7b37db74e2 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_resource_json_body.py @@ -0,0 +1,81 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.update_resource_json_body_value import UpdateResourceJsonBodyValue +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateResourceJsonBody") + + +@attr.s(auto_attribs=True) +class UpdateResourceJsonBody: + """ + Attributes: + path (Union[Unset, str]): + description (Union[Unset, str]): + value (Union[Unset, UpdateResourceJsonBodyValue]): + """ + + path: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + value: Union[Unset, UpdateResourceJsonBodyValue] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + description = self.description + value: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.value, Unset): + value = self.value.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if path is not UNSET: + field_dict["path"] = path + if description is not UNSET: + field_dict["description"] = description + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path", UNSET) + + description = d.pop("description", UNSET) + + _value = d.pop("value", UNSET) + value: Union[Unset, UpdateResourceJsonBodyValue] + if isinstance(_value, Unset): + value = UNSET + else: + value = UpdateResourceJsonBodyValue.from_dict(_value) + + update_resource_json_body = cls( + path=path, + description=description, + value=value, + ) + + update_resource_json_body.additional_properties = d + return update_resource_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_resource_json_body_value.py b/python-client/windmill-api/windmill_api/models/update_resource_json_body_value.py new file mode 100644 index 0000000000..6bad3255f3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_resource_json_body_value.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="UpdateResourceJsonBodyValue") + + +@attr.s(auto_attribs=True) +class UpdateResourceJsonBodyValue: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + update_resource_json_body_value = cls() + + update_resource_json_body_value.additional_properties = d + return update_resource_json_body_value + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_resource_type_json_body.py b/python-client/windmill-api/windmill_api/models/update_resource_type_json_body.py new file mode 100644 index 0000000000..39670a2f2d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_resource_type_json_body.py @@ -0,0 +1,65 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateResourceTypeJsonBody") + + +@attr.s(auto_attribs=True) +class UpdateResourceTypeJsonBody: + """ + Attributes: + schema (Union[Unset, str]): + description (Union[Unset, str]): + """ + + schema: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + schema = self.schema + description = self.description + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if schema is not UNSET: + field_dict["schema"] = schema + if description is not UNSET: + field_dict["description"] = description + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + schema = d.pop("schema", UNSET) + + description = d.pop("description", UNSET) + + update_resource_type_json_body = cls( + schema=schema, + description=description, + ) + + update_resource_type_json_body.additional_properties = d + return update_resource_type_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_schedule_json_body.py b/python-client/windmill-api/windmill_api/models/update_schedule_json_body.py new file mode 100644 index 0000000000..17639c269f --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_schedule_json_body.py @@ -0,0 +1,80 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.update_schedule_json_body_args import UpdateScheduleJsonBodyArgs + +T = TypeVar("T", bound="UpdateScheduleJsonBody") + + +@attr.s(auto_attribs=True) +class UpdateScheduleJsonBody: + """ + Attributes: + schedule (str): + script_path (str): + is_flow (bool): + args (UpdateScheduleJsonBodyArgs): + """ + + schedule: str + script_path: str + is_flow: bool + args: UpdateScheduleJsonBodyArgs + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + schedule = self.schedule + script_path = self.script_path + is_flow = self.is_flow + args = self.args.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "schedule": schedule, + "script_path": script_path, + "is_flow": is_flow, + "args": args, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + schedule = d.pop("schedule") + + script_path = d.pop("script_path") + + is_flow = d.pop("is_flow") + + args = UpdateScheduleJsonBodyArgs.from_dict(d.pop("args")) + + update_schedule_json_body = cls( + schedule=schedule, + script_path=script_path, + is_flow=is_flow, + args=args, + ) + + update_schedule_json_body.additional_properties = d + return update_schedule_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_schedule_json_body_args.py b/python-client/windmill-api/windmill_api/models/update_schedule_json_body_args.py new file mode 100644 index 0000000000..56b874d3fd --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_schedule_json_body_args.py @@ -0,0 +1,44 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="UpdateScheduleJsonBodyArgs") + + +@attr.s(auto_attribs=True) +class UpdateScheduleJsonBodyArgs: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + update_schedule_json_body_args = cls() + + update_schedule_json_body_args.additional_properties = d + return update_schedule_json_body_args + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_user_json_body.py b/python-client/windmill-api/windmill_api/models/update_user_json_body.py new file mode 100644 index 0000000000..0702ca5c23 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_user_json_body.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateUserJsonBody") + + +@attr.s(auto_attribs=True) +class UpdateUserJsonBody: + """ + Attributes: + is_admin (Union[Unset, bool]): + """ + + is_admin: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + is_admin = self.is_admin + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if is_admin is not UNSET: + field_dict["is_admin"] = is_admin + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + is_admin = d.pop("is_admin", UNSET) + + update_user_json_body = cls( + is_admin=is_admin, + ) + + update_user_json_body.additional_properties = d + return update_user_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/update_variable_json_body.py b/python-client/windmill-api/windmill_api/models/update_variable_json_body.py new file mode 100644 index 0000000000..fa15ea7b26 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/update_variable_json_body.py @@ -0,0 +1,81 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateVariableJsonBody") + + +@attr.s(auto_attribs=True) +class UpdateVariableJsonBody: + """ + Attributes: + path (Union[Unset, str]): + value (Union[Unset, str]): + is_secret (Union[Unset, bool]): + description (Union[Unset, str]): + """ + + path: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + is_secret: Union[Unset, bool] = UNSET + description: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + value = self.value + is_secret = self.is_secret + description = self.description + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if path is not UNSET: + field_dict["path"] = path + if value is not UNSET: + field_dict["value"] = value + if is_secret is not UNSET: + field_dict["is_secret"] = is_secret + if description is not UNSET: + field_dict["description"] = description + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path", UNSET) + + value = d.pop("value", UNSET) + + is_secret = d.pop("is_secret", UNSET) + + description = d.pop("description", UNSET) + + update_variable_json_body = cls( + path=path, + value=value, + is_secret=is_secret, + description=description, + ) + + update_variable_json_body.additional_properties = d + return update_variable_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/usage.py b/python-client/windmill-api/windmill_api/models/usage.py new file mode 100644 index 0000000000..569a1fec20 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/usage.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Usage") + + +@attr.s(auto_attribs=True) +class Usage: + """ + Attributes: + duration_ms (Union[Unset, int]): + jobs (Union[Unset, int]): + flows (Union[Unset, int]): + """ + + duration_ms: Union[Unset, int] = UNSET + jobs: Union[Unset, int] = UNSET + flows: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + duration_ms = self.duration_ms + jobs = self.jobs + flows = self.flows + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if duration_ms is not UNSET: + field_dict["duration_ms"] = duration_ms + if jobs is not UNSET: + field_dict["jobs"] = jobs + if flows is not UNSET: + field_dict["flows"] = flows + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + duration_ms = d.pop("duration_ms", UNSET) + + jobs = d.pop("jobs", UNSET) + + flows = d.pop("flows", UNSET) + + usage = cls( + duration_ms=duration_ms, + jobs=jobs, + flows=flows, + ) + + usage.additional_properties = d + return usage + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/user.py b/python-client/windmill-api/windmill_api/models/user.py new file mode 100644 index 0000000000..784379839d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/user.py @@ -0,0 +1,131 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr +from dateutil.parser import isoparse + +from ..models.user_usage import UserUsage +from ..types import UNSET, Unset + +T = TypeVar("T", bound="User") + + +@attr.s(auto_attribs=True) +class User: + """ + Attributes: + email (str): + username (str): + is_admin (bool): + is_super_admin (bool): + created_at (datetime.datetime): + operator (bool): + disabled (bool): + groups (Union[Unset, List[str]]): + usage (Union[Unset, UserUsage]): + """ + + email: str + username: str + is_admin: bool + is_super_admin: bool + created_at: datetime.datetime + operator: bool + disabled: bool + groups: Union[Unset, List[str]] = UNSET + usage: Union[Unset, UserUsage] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + email = self.email + username = self.username + is_admin = self.is_admin + is_super_admin = self.is_super_admin + created_at = self.created_at.isoformat() + + operator = self.operator + disabled = self.disabled + groups: Union[Unset, List[str]] = UNSET + if not isinstance(self.groups, Unset): + groups = self.groups + + usage: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.usage, Unset): + usage = self.usage.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "email": email, + "username": username, + "is_admin": is_admin, + "is_super_admin": is_super_admin, + "created_at": created_at, + "operator": operator, + "disabled": disabled, + } + ) + if groups is not UNSET: + field_dict["groups"] = groups + if usage is not UNSET: + field_dict["usage"] = usage + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + email = d.pop("email") + + username = d.pop("username") + + is_admin = d.pop("is_admin") + + is_super_admin = d.pop("is_super_admin") + + created_at = isoparse(d.pop("created_at")) + + operator = d.pop("operator") + + disabled = d.pop("disabled") + + groups = cast(List[str], d.pop("groups", UNSET)) + + _usage = d.pop("usage", UNSET) + usage: Union[Unset, UserUsage] + if isinstance(_usage, Unset): + usage = UNSET + else: + usage = UserUsage.from_dict(_usage) + + user = cls( + email=email, + username=username, + is_admin=is_admin, + is_super_admin=is_super_admin, + created_at=created_at, + operator=operator, + disabled=disabled, + groups=groups, + usage=usage, + ) + + user.additional_properties = d + return user + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/user_usage.py b/python-client/windmill-api/windmill_api/models/user_usage.py new file mode 100644 index 0000000000..a12bd68f36 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/user_usage.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UserUsage") + + +@attr.s(auto_attribs=True) +class UserUsage: + """ + Attributes: + duration_ms (Union[Unset, int]): + jobs (Union[Unset, int]): + flows (Union[Unset, int]): + """ + + duration_ms: Union[Unset, int] = UNSET + jobs: Union[Unset, int] = UNSET + flows: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + duration_ms = self.duration_ms + jobs = self.jobs + flows = self.flows + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if duration_ms is not UNSET: + field_dict["duration_ms"] = duration_ms + if jobs is not UNSET: + field_dict["jobs"] = jobs + if flows is not UNSET: + field_dict["flows"] = flows + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + duration_ms = d.pop("duration_ms", UNSET) + + jobs = d.pop("jobs", UNSET) + + flows = d.pop("flows", UNSET) + + user_usage = cls( + duration_ms=duration_ms, + jobs=jobs, + flows=flows, + ) + + user_usage.additional_properties = d + return user_usage + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/user_workspace_list.py b/python-client/windmill-api/windmill_api/models/user_workspace_list.py new file mode 100644 index 0000000000..969595f8f3 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/user_workspace_list.py @@ -0,0 +1,75 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.user_workspace_list_workspaces_item import UserWorkspaceListWorkspacesItem + +T = TypeVar("T", bound="UserWorkspaceList") + + +@attr.s(auto_attribs=True) +class UserWorkspaceList: + """ + Attributes: + email (str): + workspaces (List[UserWorkspaceListWorkspacesItem]): + """ + + email: str + workspaces: List[UserWorkspaceListWorkspacesItem] + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + email = self.email + workspaces = [] + for workspaces_item_data in self.workspaces: + workspaces_item = workspaces_item_data.to_dict() + + workspaces.append(workspaces_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "email": email, + "workspaces": workspaces, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + email = d.pop("email") + + workspaces = [] + _workspaces = d.pop("workspaces") + for workspaces_item_data in _workspaces: + workspaces_item = UserWorkspaceListWorkspacesItem.from_dict(workspaces_item_data) + + workspaces.append(workspaces_item) + + user_workspace_list = cls( + email=email, + workspaces=workspaces, + ) + + user_workspace_list.additional_properties = d + return user_workspace_list + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/user_workspace_list_workspaces_item.py b/python-client/windmill-api/windmill_api/models/user_workspace_list_workspaces_item.py new file mode 100644 index 0000000000..fd4dd2d998 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/user_workspace_list_workspaces_item.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="UserWorkspaceListWorkspacesItem") + + +@attr.s(auto_attribs=True) +class UserWorkspaceListWorkspacesItem: + """ + Attributes: + id (str): + name (str): + username (str): + """ + + id: str + name: str + username: str + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + name = self.name + username = self.username + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "username": username, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id") + + name = d.pop("name") + + username = d.pop("username") + + user_workspace_list_workspaces_item = cls( + id=id, + name=name, + username=username, + ) + + user_workspace_list_workspaces_item.additional_properties = d + return user_workspace_list_workspaces_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/whoami_response_200.py b/python-client/windmill-api/windmill_api/models/whoami_response_200.py new file mode 100644 index 0000000000..b76b38605a --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/whoami_response_200.py @@ -0,0 +1,131 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr +from dateutil.parser import isoparse + +from ..models.whoami_response_200_usage import WhoamiResponse200Usage +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WhoamiResponse200") + + +@attr.s(auto_attribs=True) +class WhoamiResponse200: + """ + Attributes: + email (str): + username (str): + is_admin (bool): + is_super_admin (bool): + created_at (datetime.datetime): + operator (bool): + disabled (bool): + groups (Union[Unset, List[str]]): + usage (Union[Unset, WhoamiResponse200Usage]): + """ + + email: str + username: str + is_admin: bool + is_super_admin: bool + created_at: datetime.datetime + operator: bool + disabled: bool + groups: Union[Unset, List[str]] = UNSET + usage: Union[Unset, WhoamiResponse200Usage] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + email = self.email + username = self.username + is_admin = self.is_admin + is_super_admin = self.is_super_admin + created_at = self.created_at.isoformat() + + operator = self.operator + disabled = self.disabled + groups: Union[Unset, List[str]] = UNSET + if not isinstance(self.groups, Unset): + groups = self.groups + + usage: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.usage, Unset): + usage = self.usage.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "email": email, + "username": username, + "is_admin": is_admin, + "is_super_admin": is_super_admin, + "created_at": created_at, + "operator": operator, + "disabled": disabled, + } + ) + if groups is not UNSET: + field_dict["groups"] = groups + if usage is not UNSET: + field_dict["usage"] = usage + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + email = d.pop("email") + + username = d.pop("username") + + is_admin = d.pop("is_admin") + + is_super_admin = d.pop("is_super_admin") + + created_at = isoparse(d.pop("created_at")) + + operator = d.pop("operator") + + disabled = d.pop("disabled") + + groups = cast(List[str], d.pop("groups", UNSET)) + + _usage = d.pop("usage", UNSET) + usage: Union[Unset, WhoamiResponse200Usage] + if isinstance(_usage, Unset): + usage = UNSET + else: + usage = WhoamiResponse200Usage.from_dict(_usage) + + whoami_response_200 = cls( + email=email, + username=username, + is_admin=is_admin, + is_super_admin=is_super_admin, + created_at=created_at, + operator=operator, + disabled=disabled, + groups=groups, + usage=usage, + ) + + whoami_response_200.additional_properties = d + return whoami_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/whoami_response_200_usage.py b/python-client/windmill-api/windmill_api/models/whoami_response_200_usage.py new file mode 100644 index 0000000000..c12961487b --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/whoami_response_200_usage.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WhoamiResponse200Usage") + + +@attr.s(auto_attribs=True) +class WhoamiResponse200Usage: + """ + Attributes: + duration_ms (Union[Unset, int]): + jobs (Union[Unset, int]): + flows (Union[Unset, int]): + """ + + duration_ms: Union[Unset, int] = UNSET + jobs: Union[Unset, int] = UNSET + flows: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + duration_ms = self.duration_ms + jobs = self.jobs + flows = self.flows + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if duration_ms is not UNSET: + field_dict["duration_ms"] = duration_ms + if jobs is not UNSET: + field_dict["jobs"] = jobs + if flows is not UNSET: + field_dict["flows"] = flows + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + duration_ms = d.pop("duration_ms", UNSET) + + jobs = d.pop("jobs", UNSET) + + flows = d.pop("flows", UNSET) + + whoami_response_200_usage = cls( + duration_ms=duration_ms, + jobs=jobs, + flows=flows, + ) + + whoami_response_200_usage.additional_properties = d + return whoami_response_200_usage + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/whois_response_200.py b/python-client/windmill-api/windmill_api/models/whois_response_200.py new file mode 100644 index 0000000000..1a9f07fb5d --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/whois_response_200.py @@ -0,0 +1,131 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr +from dateutil.parser import isoparse + +from ..models.whois_response_200_usage import WhoisResponse200Usage +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WhoisResponse200") + + +@attr.s(auto_attribs=True) +class WhoisResponse200: + """ + Attributes: + email (str): + username (str): + is_admin (bool): + is_super_admin (bool): + created_at (datetime.datetime): + operator (bool): + disabled (bool): + groups (Union[Unset, List[str]]): + usage (Union[Unset, WhoisResponse200Usage]): + """ + + email: str + username: str + is_admin: bool + is_super_admin: bool + created_at: datetime.datetime + operator: bool + disabled: bool + groups: Union[Unset, List[str]] = UNSET + usage: Union[Unset, WhoisResponse200Usage] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + email = self.email + username = self.username + is_admin = self.is_admin + is_super_admin = self.is_super_admin + created_at = self.created_at.isoformat() + + operator = self.operator + disabled = self.disabled + groups: Union[Unset, List[str]] = UNSET + if not isinstance(self.groups, Unset): + groups = self.groups + + usage: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.usage, Unset): + usage = self.usage.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "email": email, + "username": username, + "is_admin": is_admin, + "is_super_admin": is_super_admin, + "created_at": created_at, + "operator": operator, + "disabled": disabled, + } + ) + if groups is not UNSET: + field_dict["groups"] = groups + if usage is not UNSET: + field_dict["usage"] = usage + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + email = d.pop("email") + + username = d.pop("username") + + is_admin = d.pop("is_admin") + + is_super_admin = d.pop("is_super_admin") + + created_at = isoparse(d.pop("created_at")) + + operator = d.pop("operator") + + disabled = d.pop("disabled") + + groups = cast(List[str], d.pop("groups", UNSET)) + + _usage = d.pop("usage", UNSET) + usage: Union[Unset, WhoisResponse200Usage] + if isinstance(_usage, Unset): + usage = UNSET + else: + usage = WhoisResponse200Usage.from_dict(_usage) + + whois_response_200 = cls( + email=email, + username=username, + is_admin=is_admin, + is_super_admin=is_super_admin, + created_at=created_at, + operator=operator, + disabled=disabled, + groups=groups, + usage=usage, + ) + + whois_response_200.additional_properties = d + return whois_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/whois_response_200_usage.py b/python-client/windmill-api/windmill_api/models/whois_response_200_usage.py new file mode 100644 index 0000000000..d631720f76 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/whois_response_200_usage.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WhoisResponse200Usage") + + +@attr.s(auto_attribs=True) +class WhoisResponse200Usage: + """ + Attributes: + duration_ms (Union[Unset, int]): + jobs (Union[Unset, int]): + flows (Union[Unset, int]): + """ + + duration_ms: Union[Unset, int] = UNSET + jobs: Union[Unset, int] = UNSET + flows: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + duration_ms = self.duration_ms + jobs = self.jobs + flows = self.flows + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if duration_ms is not UNSET: + field_dict["duration_ms"] = duration_ms + if jobs is not UNSET: + field_dict["jobs"] = jobs + if flows is not UNSET: + field_dict["flows"] = flows + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + duration_ms = d.pop("duration_ms", UNSET) + + jobs = d.pop("jobs", UNSET) + + flows = d.pop("flows", UNSET) + + whois_response_200_usage = cls( + duration_ms=duration_ms, + jobs=jobs, + flows=flows, + ) + + whois_response_200_usage.additional_properties = d + return whois_response_200_usage + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/worker_ping.py b/python-client/windmill-api/windmill_api/models/worker_ping.py new file mode 100644 index 0000000000..6486f2c3e6 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/worker_ping.py @@ -0,0 +1,96 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar + +import attr +from dateutil.parser import isoparse + +T = TypeVar("T", bound="WorkerPing") + + +@attr.s(auto_attribs=True) +class WorkerPing: + """ + Attributes: + worker (str): + worker_instance (str): + ping_at (datetime.datetime): + started_at (datetime.datetime): + ip (str): + jobs_executed (float): + """ + + worker: str + worker_instance: str + ping_at: datetime.datetime + started_at: datetime.datetime + ip: str + jobs_executed: float + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + worker = self.worker + worker_instance = self.worker_instance + ping_at = self.ping_at.isoformat() + + started_at = self.started_at.isoformat() + + ip = self.ip + jobs_executed = self.jobs_executed + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "worker": worker, + "worker_instance": worker_instance, + "ping_at": ping_at, + "started_at": started_at, + "ip": ip, + "jobs_executed": jobs_executed, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + worker = d.pop("worker") + + worker_instance = d.pop("worker_instance") + + ping_at = isoparse(d.pop("ping_at")) + + started_at = isoparse(d.pop("started_at")) + + ip = d.pop("ip") + + jobs_executed = d.pop("jobs_executed") + + worker_ping = cls( + worker=worker, + worker_instance=worker_instance, + ping_at=ping_at, + started_at=started_at, + ip=ip, + jobs_executed=jobs_executed, + ) + + worker_ping.additional_properties = d + return worker_ping + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/workspace.py b/python-client/windmill-api/windmill_api/models/workspace.py new file mode 100644 index 0000000000..8ae0b6ef63 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/workspace.py @@ -0,0 +1,81 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Workspace") + + +@attr.s(auto_attribs=True) +class Workspace: + """ + Attributes: + id (str): + name (str): + owner (str): + domain (Union[Unset, str]): + """ + + id: str + name: str + owner: str + domain: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + name = self.name + owner = self.owner + domain = self.domain + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "owner": owner, + } + ) + if domain is not UNSET: + field_dict["domain"] = domain + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id") + + name = d.pop("name") + + owner = d.pop("owner") + + domain = d.pop("domain", UNSET) + + workspace = cls( + id=id, + name=name, + owner=owner, + domain=domain, + ) + + workspace.additional_properties = d + return workspace + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/models/workspace_invite.py b/python-client/windmill-api/windmill_api/models/workspace_invite.py new file mode 100644 index 0000000000..2a41094866 --- /dev/null +++ b/python-client/windmill-api/windmill_api/models/workspace_invite.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="WorkspaceInvite") + + +@attr.s(auto_attribs=True) +class WorkspaceInvite: + """ + Attributes: + workspace_id (str): + email (str): + is_admin (bool): + """ + + workspace_id: str + email: str + is_admin: bool + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + workspace_id = self.workspace_id + email = self.email + is_admin = self.is_admin + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "workspace_id": workspace_id, + "email": email, + "is_admin": is_admin, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + workspace_id = d.pop("workspace_id") + + email = d.pop("email") + + is_admin = d.pop("is_admin") + + workspace_invite = cls( + workspace_id=workspace_id, + email=email, + is_admin=is_admin, + ) + + workspace_invite.additional_properties = d + return workspace_invite + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python-client/windmill-api/windmill_api/py.typed b/python-client/windmill-api/windmill_api/py.typed new file mode 100644 index 0000000000..1aad32711f --- /dev/null +++ b/python-client/windmill-api/windmill_api/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561 \ No newline at end of file diff --git a/python-client/windmill-api/windmill_api/types.py b/python-client/windmill-api/windmill_api/types.py new file mode 100644 index 0000000000..d8727579fd --- /dev/null +++ b/python-client/windmill-api/windmill_api/types.py @@ -0,0 +1,43 @@ +""" Contains some shared types for properties """ +from typing import BinaryIO, Generic, MutableMapping, Optional, Tuple, TypeVar + +import attr + + +class Unset: + def __bool__(self) -> bool: + return False + + +UNSET: Unset = Unset() + +FileJsonType = Tuple[Optional[str], BinaryIO, Optional[str]] + + +@attr.s(auto_attribs=True) +class File: + """Contains information for file uploads""" + + payload: BinaryIO + file_name: Optional[str] = None + mime_type: Optional[str] = None + + def to_tuple(self) -> FileJsonType: + """Return a tuple representation that httpx will accept for multipart/form-data""" + return self.file_name, self.payload, self.mime_type + + +T = TypeVar("T") + + +@attr.s(auto_attribs=True) +class Response(Generic[T]): + """A response from an endpoint""" + + status_code: int + content: bytes + headers: MutableMapping[str, str] + parsed: Optional[T] + + +__all__ = ["File", "Response", "FileJsonType"]